
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@frihet/aeb43-parser
Advanced tools
AEB43 (Norma 43) Spanish bank statement parser for TypeScript. Supports BBVA, Santander, Sabadell, CaixaBank, Bankinter, and all AEB-standard N43 files.
TypeScript parser for AEB43 (Norma 43) Spanish bank statement files (.N43 / .n43).
Supports BBVA, Santander, Sabadell, CaixaBank, Bankinter, and any bank that follows the AEB standard.
npm install @frihet/aeb43-parser
# or
pnpm add @frihet/aeb43-parser
import { parseAEB43 } from '@frihet/aeb43-parser';
import { readFileSync } from 'node:fs';
// AEB43 files use ISO-8859-1 (latin1) encoding
const content = readFileSync('statement.n43', 'latin1');
const statement = parseAEB43(content);
console.log(`Accounts: ${statement.accountCount}`);
for (const account of statement.accounts) {
console.log(`Account: ${account.accountId}`);
console.log(`Opening: ${account.openingBalance} EUR`);
console.log(`Closing: ${account.closingBalance} EUR`);
for (const tx of account.transactions) {
console.log(`${tx.operationDate} ${tx.amount} — ${tx.description}`);
}
}
import { parseAEB43, isAEB43 } from '@frihet/aeb43-parser';
async function handleFile(file: File) {
// Detect format
const firstBytes = await file.slice(0, 120).text();
if (!isAEB43(firstBytes, file.name)) {
throw new Error('Not an AEB43 file');
}
// Read as latin1 (AEB43 encoding)
const buffer = await file.arrayBuffer();
const content = new TextDecoder('iso-8859-1').decode(buffer);
return parseAEB43(content);
}
parseAEB43(content: string): AEB43StatementParse an AEB43 file content string. Both LF and CRLF line endings are supported.
Throws AEB43ParseError on structural violations (bad sign chars, wrong record count, unknown record types, etc.).
isAEB43(content: string, fileName?: string): booleanDetect whether content (or a filename) is likely AEB43 format. Checks .n43 / .N43 extension and/or the record-11 content signature.
interface AEB43Statement {
accountCount: number;
totalRecords: number;
accounts: AEB43Account[];
}
interface AEB43Account {
entityCode: string; // e.g. '0049' (Santander), '0182' (BBVA)
branchCode: string; // 4-digit branch
accountNumber: string; // 10-digit account
accountId: string; // '{entity}-{branch}-{account}'
startDate: string; // ISO 8601 YYYY-MM-DD
endDate: string; // ISO 8601 YYYY-MM-DD
openingBalance: number; // Positive = credit, Negative = debit
closingBalance: number;
totalDebits: number;
totalCredits: number;
debitCount: number;
creditCount: number;
transactions: AEB43Transaction[];
}
interface AEB43Transaction {
operationDate: string; // ISO 8601 YYYY-MM-DD
valueDate: string; // ISO 8601 YYYY-MM-DD (fecha valor)
amount: number; // Positive = credit, Negative = debit
conceptCode: string; // 2-digit AEB concept code
description: string; // Primary description (from reference fields)
additionalDescription: string; // From record 23/24 extension lines
reference1: string; // Document number field
reference2: string; // Secondary reference
rawLine: string; // Original 80-char record 22 line
}
AEB43 (Norma 43) is a fixed-width, 80-character per line ASCII format published by the Asociación Española de Banca (AEB).
Record types:
Amount encoding: sign char (1 = positive, 2 = negative) followed by digits with 2 implicit decimal places.
Date encoding: YYMMDD — year < 50 maps to 20xx, year >= 50 maps to 19xx.
Official spec: AEB Norma 43
This package is publish-ready. To publish to npm when approved:
cd packages/aeb43-parser
npm run build # Compile TypeScript to dist/
npm publish --access public
Ensure dist/ is built and clean before publishing. The prepublishOnly script runs build automatically.
Apache-2.0 — see LICENSE.
Built by Frihet — AI-native ERP for freelancers and SMEs.
FAQs
AEB43 (Norma 43) Spanish bank statement parser for TypeScript. Supports BBVA, Santander, Sabadell, CaixaBank, Bankinter, and all AEB-standard N43 files.
The npm package @frihet/aeb43-parser receives a total of 0 weekly downloads. As such, @frihet/aeb43-parser popularity was classified as not popular.
We found that @frihet/aeb43-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.