Skip to content

BAI2 bank statement to CSV and Excel

Decode ANSI X9.61 BAI2 bank files locally: join 88 continuation lines, map BAI type codes, and reconcile 49/98/99 trailers.

Drop an ANSI X9.61 BAI2 statement file here

Joins 88 continuation lines, decodes BAI summary and detail codes, and checks 49/98/99 trailers locally.

Loads a synthetic corporate treasury BAI2 file.

How to use BAI2 to CSV

  1. Drop or select a BAI2 file. Drag a .bai, .bai2, or .txt statement into the drop sheet, click Choose BAI2 file, or click Load sample BAI2 statement to inspect synthetic Harbor Treasury records.
  2. Inspect 49, 98, and 99 control status. Check the header badge to confirm control totals PASS or review exact line-numbered errors and warnings in the issue panel.
  3. Review account balances and transaction rows. Compare Opening Ledger (010) and Closing Ledger (015) summary cards alongside the preview table, capped on screen at 300 rows.
  4. Choose export format and masking. Select Transactions CSV (.csv) or Excel workbook (.xlsx), toggle Mask account numbers if needed, and click Export to download locally.

Everything you type stays in this browser on your device. Nothing is uploaded, and your saved details are never sent anywhere.

How does ANSI X9.61 BAI2 decode record hierarchies and 88 continuations?

Corporate cash-management exports structure bank balances and entries into comma-delimited lines tagged by two-digit numeric prefixes. Inside a local Web Worker, this converter decodes UTF-8 or Windows-1252 files up to 25 MB, strips trailing slashes, and stitches 88 continuation lines onto parent records before parsing amounts.

Published by the ASC X9 Balance and Transaction Reporting Standard, this hierarchy nests file (01), group (02), account (03), detail (16), and continuation (88) lines down to nested trailers. Statements lacking at least one core 01, 02, 03, or 16 record raise an immediate format error.

Mapping 01 through 99 record types and BAI detail codes

To decode BAI type codes and record hierarchies reliably, each physical line maps to a structural parent and extracts repeating fields. Within type 03 lines, the parser walks variable-length summary tuples to surface 010 Opening Ledger, 015 Closing Ledger, 040 Opening Available, and 045 Closing Available balances.

Record Role Primary parsed fields Trailer check scope
01 File Header Sender, receiver, YYMMDD date, version 2 Counted in 99 file lines
02 Group Header Originator, status, as-of date, default USD Starts 98 group line count
03 Account Identifier Account number, ISO 4217 code, summary tuples Starts 49 minor sum and count
16 Transaction Detail Type code, minor amount, funds code, references Contributes entry sum to 49
88 Continuation Overflow tuples or narrative joined to parent Increments 49, 98, and 99 counts
49 / 98 / 99 Control Trailers Minor-unit sum, child count, physical records Audited against computed totals

Built-in lookups translate 68 standard BAI codes across 010-075 status summaries, 100-399 credits including 115 lockbox and 195 incoming wires, and 400-699 debits such as 455 ACH debits and 475 paid checks. Unmapped codes between 101-399 default to credits and 401-699 default to debits.

Two-digit header dates, funds codes, and US ACH settlement cross-checks

Header YYMMDD timestamps resolve cleanly to ISO 8601 dates using a century pivot where years 00-69 map to 2000-2069 and 70-99 map to 1970-1999. Transaction availability flags (0, 1, 2, S, V, D, and Z) decode timing metadata alongside distributed availability subfields.

When bank statements report aggregated or settled US ACH batches under codes 142, 451, or 455, treasury staff often reconcile those lines back to submitted payment files. You can inspect originating entry batches locally in the NACHA ACH viewer to compare trace numbers and effective entry dates.

Reconciling 49, 98, and 99 control trailers with ISO 4217 precision

Nested trailer records detect missing lines or corrupted amounts before accounting teams import bank statements. After scanning every line, the header status badge displays 49 / 98 / 99 control totals PASS or lists the exact count of control errors alongside line-numbered diagnostics.

Below the badge, the summary bar shows the sender ID, account count, and physical record count beside sidebar totals for Transactions (16), Accounts (03), and 99 Control Minor Sum.

Auditing account minor-unit sums and physical record counts

For each account, the type 49 check sums every minor-unit amount from 03 summary tuples plus child 16 entries, checking sum and record counts. Type 98 and 99 trailers roll up child sums and counts.

Displaying minor units relies on ISO 4217 currency decimals documented in the SIX Global Financial Data Standards. Standard USD, EUR, and GBP divide by 100, while JPY, KRW, VND, CLP, ISK, and HUF use 0 decimals, and BHD, KWD, OMR, JOD, TND, IQD, and LYD use 3 decimals.

Aligning corporate BAI2 feeds with Open Financial Exchange files

Regional bank portals often deliver Open Financial Exchange downloads instead of corporate ANSI X9.61 transmissions. Unclosed 02 or 03 blocks trigger warnings so analysts catch truncated feeds early.

When an entity receives .ofx or .qbo statements alongside corporate files, convert OFX and QBO bank exports to CSV in the companion parser to combine cash positions consistently.

Choosing between RFC 4180 CSV and three-sheet Excel exports

Export choices govern whether treasury teams load flat tables into ERPs or archive audit logs. Under Export format, Transactions CSV (.csv) is default, while Excel workbook (.xlsx) saves multi-tab checks.

Comparing CSV transaction tables against multi-tab workbooks

Choosing between CSV and Excel workbook export shapes downstream close work when converting a BAI2 bank file to Excel offline. CSV writes 13 columns for 16 rows: As-Of Date, Account, Currency, BAI Code, Type Description, Direction, Debit, Credit, Amount, Bank Ref, Customer Ref, Funds Availability, and Narrative.

CSV exports strictly follow IETF RFC 4180 comma-separated quoting rules so embedded commas stay quoted cleanly, with a leading UTF-8 Byte Order Mark for Excel.

Selecting Excel workbook (.xlsx) generates three worksheets with numeric currency columns ready for formulas. Account Balances compares Opening Ledger, Closing Ledger, Opening Available, Closing Available, credits, debits, and declared vs. computed 49 totals, while Control Audit logs every ERROR, WARNING, or PASS check.

Preview limits, synthetic fixtures, and legacy archive migration

Because treasury dumps hold thousands of entries, on-screen preview caps rendering at 300 rows while export writes every transaction. Click Load sample BAI2 statement to test parsing with harbor-treasury-sample.bai2 covering METROBANK and HARBORCORP.

Teams consolidating legacy bookkeeping archives alongside treasury feeds also process Quicken text ledgers using the legacy Quicken QIF statement converter to normalize historical accounts cleanly.

Local privacy, formula neutralization, and treasury verification limits

Cash reports contain sensitive account identifiers, wires, and balances. Everything executes 100% locally in a browser Web Worker loaded only after picking a file, ensuring zero statement bytes or filenames leave your device.

Remittance text starting with =, +, -, @, or | can trigger spreadsheet macro evaluation. Aligned with MITRE CWE-1236 CSV formula neutralization guidance, this exporter helps sanitize CSV formula injection risks by prefixing unsafe leading symbols with an apostrophe.

For Windows-1252 or UTF-8 inputs, the byte decoder strips incoming UTF-8 BOM headers or decodes Windows-1252 automatically. Clicking Choose another file clears the workspace between accounts.

Tip: Enable Mask account numbers before sharing exports outside finance, since masking starts disabled so internal ERP pipelines receive complete account numbers.

Global cash desks auditing Asia-Pacific batches alongside US statements can also run private Australian ABA file checks before treasury submission locally for 120-character Cemtex disbursements.

This BAI2 converter parses structural records, currency scaling, and trailer arithmetic for informational purposes only and does not constitute accounting, tax, or financial advice. Confirm unusual bank type codes, unclosed balance discrepancies, and statutory close entries with your relationship bank and a qualified accountant.

Questions

How does this parser handle 88 continuation lines in BAI2 files?

Any 88 continuation record immediately following an 03 account summary or 16 transaction detail row is joined onto its parent record before reading summary tuples or narrative text. Every physical 88 line also increments the line counters verified against type 49, 98, and 99 trailers.

Are bank account numbers masked automatically before exporting?

No. The Mask account numbers option starts unchecked in the BAI2 converter so internal treasury teams retain full account identifiers during reconciliation. Enable account masking before clicking Export when sharing redacted spreadsheets outside your accounting team.

Which currencies use zero or three decimal places in BAI2 scaling?

Standard currencies including USD, EUR, GBP, and CAD use two decimal places, whereas ISO 4217 minor units differ for other currencies. The parser scales JPY, KRW, VND, CLP, ISK, and HUF with 0 decimals, and scales BHD, KWD, OMR, JOD, TND, IQD, and LYD with 3 decimals.

What happens when a BAI2 statement fails 49, 98, or 99 reconciliation?

The top status badge flags the exact count of control errors and lists line-numbered mismatches above the transaction grid. You can still review parsed entries in the 300-row table and export an Excel workbook containing the dedicated Control Audit worksheet.

What is the difference between Transactions CSV and Excel workbook export?

Transactions CSV (.csv) defaults to a UTF-8 BOM comma-delimited file listing 13 columns per 16 detail row with separate Debit, Credit, and signed Amount columns. Excel workbook (.xlsx) outputs three formatted worksheets covering Transactions, Account Balances, and Control Audit.

Does any BAI2 bank file data leave my browser during conversion?

No. Decoding, 88 continuation assembly, control reconciliation, and spreadsheet generation run inside a local Web Worker tab on your computer. Files up to 25 MB are converted completely offline without sending balances, account numbers, or narratives to any remote server.

Updated