Conversion

Convert a BAI2 Bank File to CSV for Treasury

A BAI2 file is dense bank cash-management data your spreadsheet can't read. Convert it to a CSV to flatten the records into transaction rows with readable type codes.

6 min read
Updated 2026-08-06
By EasyBankConvert Team

TL;DR - Quick Summary

A BAI2 file is the cash-management format US banks use to report balances and transactions, but its coded, hierarchical text is not something you can read in a spreadsheet. Convert the BAI2 to a CSV to flatten it into one row per transaction, with the account, amount, and a readable label for each BAI type code.

What a BAI2 file is

BAI2 is a cash-management and balance-reporting standard from the Bank Administration Institute, widely used by US banks to send corporate customers their daily balances and transactions. A treasury or finance team typically receives a fresh BAI2 file each day with posted activity, sometimes with intraday files for pending items, and imports it for reconciliation. It is a plain-text file, but not a simple one: it is organized as a strict hierarchy of records, each line starting with a two-digit code that says what the record is. That structure is efficient for machines and opaque for people, which is where a conversion to CSV comes in.

Why you can't just open it in a spreadsheet

Open a BAI2 in a spreadsheet and you get a wall of coded lines, not columns you can sort. The file nests transactions inside accounts inside groups: an 01 file header names the sender and currency, a 03 account header carries the account number and opening balance, each 16 record is one transaction with a coded type and amount, and 49, 98, and 99 trailers total the account, group, and file. A transaction row on its own does not even show which account it belongs to; that context lives in the header above it. To analyze the data you have to flatten that hierarchy so every transaction carries its own account and date, which is exactly what the conversion does.

Flattening the hierarchy into transaction rows

Converting a BAI2 to CSV turns the nested records into a flat table. Each 16 transaction-detail record becomes one row, and the conversion pulls down the context from the headers above it, so every row carries its account number from the 03 header and the date and currency from the file header, alongside the transaction's amount and reference. The result is an ordinary CSV you can sort, filter, and pivot, or load into a system that does not speak BAI2. The account and group trailers give you control totals to confirm the flattened rows add up, so nothing is dropped in translation.

Translating BAI type codes

The heart of a BAI2 is its type codes. The specification defines several hundred of them so that an incoming wire, a lockbox deposit, an ACH credit, a check paid, and a monthly service charge each carry their own precise code rather than a free-text description. That is what makes the format good for automation, but a bare code like 275 or 475 means nothing at a glance. A useful conversion carries the code through and pairs it with a readable label, so the CSV shows both the code and what it represents. Reconciling from named transaction types is far faster than decoding numbers by hand.

Treasury reconciliation and privacy

Once the BAI2 is a flat, labeled CSV, it fits the way a treasury team actually works: sort by type code to isolate wires or fees, total by account, and reconcile against the general ledger or a system that cannot ingest BAI2 directly. Because the file carries real corporate account activity across possibly many accounts, it is processed to build the CSV and then deleted automatically, with nothing retained on a server afterward. For a group managing several bank relationships, that combination of a readable CSV and automatic deletion keeps daily cash data usable without leaving it in a third-party tool.

How it works

  1. Upload the BAI2: Upload the BAI2 file your bank sent for the day or period.
  2. Flatten to rows: Convert it to a CSV so each 16 transaction record becomes a row carrying its account and date.
  3. Read the type codes: Use the CSV's readable labels alongside each BAI type code to identify the activity.
  4. Reconcile: Sort, total by account, and reconcile the CSV against your ledger or import it downstream.

Comparison

BAI2 recordCodeWhat it holdsIn the CSV
File header01Sender, date, currencyFile-level context on each row
Account header03Account number, opening balanceAccount column per row
Transaction detail16BAI type code and amountOne CSV row each
Account trailer49Account totalsA control check

A BAI2 file with hundreds of transactions flattens to a CSV in about 30 seconds. Convert your statements now.

See pricing

Frequently Asked Questions

Related guides and articles

Try It Yourself

Experience the power of automated conversion

Start Converting