---
title: "AEB-43 Norma 43 — Parser and import status"
description: "Status of Norma 43 (AEB-43) in Frihet: import from the interface is not available. How to use the @frihet/aeb43-parser library in your own integrations."
canonical_url: "https://docs.frihet.io/en/finanzas/aeb43-norma43"
language: "en"
---

# AEB-43 Norma 43 — Parser and import status

Norma 43 (AEB-43) is the Spanish standard for exchanging bank statements between banks and management software. Spanish banks export it as a fixed-width text file with 80-character records.

:::caution Norma 43 import from the Frihet interface is not available
Today you can import statements in **OFX, QFX, MT940, CAMT.053 and CSV** from **Finance** → **Banking** → **Import Statement**; see [Bank connections](./conexiones-bancarias). The `@frihet/aeb43-parser` library (v0.1.0) is available for your own integrations and scripts.
:::

## Parser @frihet/aeb43-parser

For your own integrations or migration scripts, you can use the parser published on npm:

```bash
npm install @frihet/aeb43-parser
```

```typescript
import { parseAEB43 } from '@frihet/aeb43-parser';
import { readFileSync } from 'fs';

const raw = readFileSync('extracto.n43', 'latin1'); // Norma 43 uses ISO-8859-1
const statement = parseAEB43(raw);

for (const account of statement.accounts) {
  console.log(account.accountId, account.openingBalance, account.closingBalance);
  for (const tx of account.transactions) {
    console.log(tx.operationDate, tx.amount, tx.description);
  }
}
```

`parseAEB43` returns an `AEB43Statement` with these fields:

- `AEB43Statement`: `accountCount`, `totalRecords` and `accounts` (one entry per account in the file).
- `AEB43Account`: `entityCode`, `branchCode`, `accountNumber`, `accountId`, `startDate`, `endDate`, `openingBalance`, `closingBalance`, `totalDebits`, `totalCredits`, `debitCount`, `creditCount` and `transactions`.
- `AEB43Transaction`: `operationDate`, `valueDate`, `amount` (debit negative, credit positive), `conceptCode`, `description`, `additionalDescription`, `reference1`, `reference2` and `rawLine`.

For a malformed file, the parser throws `AEB43ParseError`. The `isAEB43(content, fileName?)` function tells you whether a file looks like Norma 43.

### Important: encoding

Norma 43 files use **ISO-8859-1** (Latin-1) encoding, not UTF-8. If you read the file manually, specify `'latin1'` as the encoding.

## Related

- [Bank reconciliation](./conciliacion-bancaria)
- [Bank rules](./reglas-bancarias)
- [Bank connections and import](./conexiones-bancarias)
- [Bank rules builder](./reglas-bancarias-constructor)
