Guides

How to Convert BAI2 to CSV Online (US Treasury File Guide)

To convert a corporate treasury BAI2 file (.bai, .bai2, or .txt) into a clean CSV spreadsheet without uploading confidential bank data, parse the file locally in your browser with the EasyExtract BAI2 to CSV Converter. It reads 03 account headers, 16 transaction rows, and 88 continuation lines in memory, divides implied-cent integers by 100, and exports formula-safe RFC 4180 CSV.

US corporate banks deliver prior-day and intraday cash management reports in the Bank Administration Institute (BAI2) flat-file standard. Opening a .bai2 download directly in Microsoft Excel produces unreadable comma lines where long remittance notes wrap onto separate 88 records and amounts lack decimal points. Treasury teams and controllers need clean rows for Excel reconciliation, NetSuite, Workday, or SAP without sending account files across public cloud converters.

What is a BAI2 file and how are records structured?

BAI2 is a line-based ASCII cash management format where every line begins with a two-digit record code and ends with a slash delimiter (/). Instead of tabular columns, transactions share state across sequential header, detail, continuation, and trailer records.

Record Code Record Name Fields Read for Accounting
01 / 02 File & Group Headers Sender ID, receiver ID, file creation timestamp, and group as-of date.
03 Account Identifier Sets the active bank account number (parts[1]) applied to following transactions.
16 Transaction Detail Holds BAI Type Code, implied-cent amount, funds type, bank reference, and initial text.
88 Continuation Record Appends overflow narrative text directly onto the preceding 16 transaction description.
49 / 98 / 99 Account, Group & File Trailers Closes the active account block and stores control totals for reconciliation.

Why do BAI2 parsers fail in Excel and naive CSV scripts?

Three format rules cause standard spreadsheet imports to break on BAI2 bank files. First, amounts are encoded as integer cents without decimal points, so 125075 means 1250.75. Second, long wire details overflow from record 16 into one or more 88 continuation lines, shifting columns in naive CSV readers. Third, BAI2 separates accounts using stateful 03 headers and closes blocks at 49, 98, and 99 trailers rather than repeating the account number on every line.

03,4001928374,USD,010,1500000,,,/
16,195,245050,S,REF88210,CUST01,ACH CREDIT ACME CORP/
88,INVOICE 2026-4410 SETTLEMENT/
49,1745050,3/

In the snippet above, the parser tracks account 4001928374 from record 03, converts 245050 on record 16 into 2450.50, attaches REF88210, and joins the 88 line so the description reads ACH CREDIT ACME CORP INVOICE 2026-4410 SETTLEMENT on one row.

How to convert BAI2 to CSV in your browser without uploads

  1. Open the EasyExtract BAI2 to CSV Converter in Chrome, Edge, Firefox, or Safari.
  2. Drop your .bai, .bai2, or .txt bank statement onto the dropzone, or click to select the file from disk.
  3. Inspect the parsed preview table showing Account, Type Code, decimal-normalized Amount, Bank Ref, and merged Description (up to 500 preview rows).
  4. Click Download CSV to save bai2-transactions.csv with formula-injection protection, or click Copy to clipboard to paste into Excel.

Why should treasury teams avoid cloud BAI2 converters?

Corporate BAI2 files expose operating account numbers, vendor wire details, payroll batch totals, and closing cash balances. Uploading those files to a remote server sends sensitive treasury records across external infrastructure. EasyExtract parses the entire file inside local browser memory using JavaScript, so zero bytes ever cross the network.

How does BAI2 compare with MT940 and CAMT.053?

Standard Primary Region Encoding Syntax EasyExtract Converter
BAI2 United States & North America Comma records (03, 16, 88) with trailing / BAI2 to CSV Converter
SWIFT MT940 Europe, UK & APAC Tagged blocks (:61:, :86:) with comma decimals MT940 to CSV Converter
ISO 20022 CAMT.053 SEPA & Global ISO 20022 Structured XML (<Ntry>, <Amt Ccy>) CAMT.053 to CSV Converter

Frequently asked questions

Does BAI2 divide amounts by 100 for every currency?

The parser divides implied-cent integers by 100 for standard two-decimal currencies such as USD, EUR, GBP, and CAD. Zero-decimal currencies such as JPY require manual column scaling in Excel after export.

Why do all amounts appear positive in BAI2 CSV output?

BAI2 stores unsigned integer amounts and encodes credit versus debit direction in the 3-digit BAI Type Code (for example, 100-series credits vs 400-series debits). Keep the Type Code column when reconciling in Excel or ERP imports.

Are corporate bank files uploaded to any server?

No. File reading and CSV serialization execute strictly inside local browser memory with zero network uploads.

Shah Abrar Ahmad - Founder & Lead Engineer
Lead Architect & Founder

Software architect and technical web engineer specializing in browser-based zero-knowledge file parsing, technical SEO, and data extraction security. Built EasyExtract to give users 100% private in-browser tools with zero cloud uploads.

Keep reading