ValidateFin
Back to blog
BAI2 → camt.0536 min readBy Eliel Nicaise

BAI2 to camt.053: Convert US & Canadian Bank Statements

BAI2 is the dominant US and Canadian bank statement format. Learn how it maps to ISO 20022 camt.053 and convert BAI2 to camt.053 free in your browser.

Validate your file right now

Free, instant and 100% in your browser - no file is ever uploaded.

Open the BAI2 Viewer & Converter

What is a BAI2 file?

BAI2 is the "Cash Management Balance Reporting" format published by the Bank Administration Institute (BAI). Version 2 was released in 1987, and it remains the dominant end-of-day bank statement format across the United States and Canada — the North American counterpart to Europe's SWIFT MT940. Banks use it to deliver balance and transaction reporting to ERP and treasury systems.

A BAI2 file is a hierarchy of numeric records, each written as a comma-delimited line terminated by a slash (/): a 01 File Header wraps one or more 02 Group Headers, each group wraps one or more 03 Account Identifiers, and each account carries its 16 Transaction Detail lines (with 88 Continuation records when a line spills over). Two BAI2 quirks trip up newcomers: amounts are expressed as whole minor units with no decimal separator (10000 means 100.00 in a 2-decimal currency such as USD or EUR, but 100 whole units in JPY, and 10.000 in a 3-decimal currency such as KWD or BHD), and the debit/credit direction is not a flag but a numeric type code — 100–399 for credits, 400–699 for debits.

Like MT940, BAI2 has no XSD schema, so the core integrity check is arithmetic. The 03 Account Identifier carries the balances by numeric code — 010 for the opening ledger balance and 015 for the closing ledger balance (040/045 are available balances) — and a well-formed file reconciles: the opening ledger balance plus the net of all transactions must equal the closing ledger balance. A file that does not reconcile has lost, duplicated or mis-signed a line.

The records inside a BAI2 file

A BAI2 file is built from a small set of numeric record codes that always nest in the same order. Here are the ones that carry the file, the groups, the accounts, the balances and the transactions.

01 — File Header

Opens the file. Carries the sender and receiver IDs, the creation date and time, and a file identification number.

02 — Group Header

Starts a group of accounts for one originator/destination and as-of date. A file can contain several groups.

03 — Account Identifier

Identifies the account and lists its balances by numeric code: 010 opening ledger, 015 closing ledger, 040/045 available balances, each with an amount in whole minor units.

16 — Transaction Detail

One record per transaction: a numeric type code that sets the direction (100–399 credit, 400–699 debit), the amount in whole minor units, a bank reference and a text description.

88 — Continuation

Continues the preceding record when its content overflows one line — most often the free-text detail of a 16 transaction.

49 / 98 / 99 — Trailers

Close each level and carry control totals: 49 the Account Trailer, 98 the Group Trailer, and 99 the File Trailer at the very end.

How BAI2 maps to ISO 20022 camt.053

camt.053 (Bank-to-Customer Statement) is the modern ISO 20022 XML replacement for BAI2. Where BAI2 packs a balance into a terse record like 03,123456789,USD,010,10000,,,015,12500,,/, camt.053 expresses the same information as structured <Bal> elements with explicit type codes (OPBD for the opening balance, CLBD for the closing balance), an amount with a currency attribute, a credit/debit indicator and a date. It is XML, far richer than BAI2, and validated against an official XSD rather than reconciled by hand.

The mapping is direct for the essentials: the 03 Account Identifier becomes the camt.053 account plus its OPBD and CLBD balance blocks, and every 16 Transaction Detail becomes an <Ntry> (booked entry) with its amount, its booking date, its description as remittance information, and — crucially — a CdtDbtInd derived from the BAI2 type code (100–399 → credit, 400–699 → debit). The whole-minor-units amount is rescaled to a proper decimal using the currency's number of decimals.

This is why the migration matters in practice: modern ERP and treasury platforms (SAP, Kyriba and others) increasingly standardise on camt.053 for statement import, regardless of where the account is held. North American finance teams sitting on BAI2 feeds need a reliable way to convert them so the same statement flows through the same ISO 20022 pipeline as their European accounts.

Converting BAI2 to camt.053 without uploading your data

A conversion is only useful if the output is a valid camt.053 that your ERP will actually accept. The key is to carry the real opening and closing balances straight from the 010/015 codes, rescale the whole-minor-units amounts using the currency's decimals so 10000 USD becomes 100.00, and derive the debit/credit indicator faithfully from each 16 type code — a 400–699 code becomes a debit entry, a 100–399 code a credit — so nothing is mis-signed. Ambiguous ranges (700+ loans, 900+ bank-specific custom codes) are flagged rather than guessed.

Just as important is what you do NOT send anywhere. A bank statement is sensitive data: account numbers, counterparties, amounts. ValidateFin parses and converts BAI2 entirely in your browser — the file never leaves your machine, there is no upload, and nothing is stored on a server. That is the difference between a quick paste-and-convert and emailing a statement to a third-party service.

Before you convert, the tool also reconciles the statement: the opening ledger balance (010) plus the net of the transactions must equal the closing ledger balance (015). If they disagree, you get a warning rather than a silently broken camt.053 — the same arithmetic check a careful treasury analyst would do by hand.

Convert your BAI2 to camt.053 now

Drop your BAI2 file into the ValidateFin BAI2 viewer to see the balances and transactions, then export a valid camt.053.001.02 statement — entirely in your browser. No BAI2 file is ever uploaded to a server.

Open the BAI2 viewer & converter

Frequently Asked Questions

What is a BAI2 file?

BAI2 is the Cash Management Balance Reporting format from the Bank Administration Institute, version 2, released in 1987. It is the dominant end-of-day bank statement format in the United States and Canada — the North American counterpart to Europe's SWIFT MT940.

What is the difference between BAI2 and MT940?

Both are legacy, schema-less text bank statement formats. MT940 is the SWIFT standard used mainly in Europe, with colon-tagged fields and a debit/credit letter mark. BAI2 dominates in the US and Canada, using nested numeric record codes (01/02/03/16…) and a numeric type code — not a flag — for direction. Both are being replaced by ISO 20022 camt.053.

Can I convert BAI2 to camt.053 for free?

Yes. The ValidateFin BAI2 tool reads a BAI2 file and exports a valid camt.053.001.02 statement for free, entirely in your browser. No signup and no upload.

Is my bank statement uploaded to a server?

No. The BAI2 file is read, parsed and converted entirely in your browser using JavaScript. No statement data is ever sent to or stored on a server.

How does BAI2 encode a debit or a credit?

By the numeric type code on the 16 Transaction Detail record, not by a flag: 100–399 are credits and 400–699 are debits. Codes 700 and above (loans) and 900 and above (bank-specific custom codes) are ambiguous and cannot be classified from the range alone.

How do I know a BAI2 file is correct?

BAI2 has no schema, so the core check is arithmetic: the opening ledger balance (code 010) plus the net of all transactions must equal the closing ledger balance (code 015). If it does not reconcile, a line has been lost, duplicated or mis-signed.

Why convert BAI2 to camt.053?

camt.053 is the ISO 20022 XML statement, validated against an official schema and far richer than BAI2's terse numeric records. Modern ERP and treasury systems (SAP, Kyriba) increasingly import camt.053 only, so converting BAI2 lets North American accounts flow through the same pipeline as European ones.

Does the converter handle files with several accounts?

Yes. The parser reads every group and account (02/03) in the file and the viewer shows each one; the camt.053 export covers the first account — the common one-file-one-account migration case.