OFX File Format Explained: Tags, Structure, and How to Read One
Jul 20, 2026
Convert your bank statement to Excel now
PDF, JPG, PNG, BMP, HEIC, TIFF, MT940
Upload your bank statement
Drop file here or click to upload
PDF, JPG, PNG, BMP, HEIC, TIFF, MT940
Uploading...
Last updated July 2026.
An OFX file is a tagged text file a bank sends so accounting software can import transactions without re-typing them. It has three parts: a signon block that names the bank, an account block with the routing and account number, and a transaction list where every entry sits inside a <STMTTRN> block carrying a type, a posting date, an amount, and a unique ID. Once you know those tags, an OFX file reads cleanly and maps straight into spreadsheet columns.
OFX (Open Financial Exchange) is the format behind the Direct Connect and Web Connect downloads in Quicken, QuickBooks, and most US bank portals. It is a data-exchange format, not a payment file: it reports what posted to an account so software can reconcile it. If you are holding a .ofx file and just need the rows in a sheet, the OFX to CSV converter parses the tags and lays the transactions out for you. This guide explains the structure so you can read the file yourself and know what each column came from.
The three blocks in every OFX file
Strip away the detail and every bank statement in OFX has the same skeleton. A signon block identifies the institution and the request status, an account block says which account the data belongs to, and a bank transaction list holds the individual entries plus the ledger balance.
| Block | Tag | What it holds |
|---|---|---|
| Signon | <SIGNONMSGSRSV1> / <SONRS> | Status code, server date, and the financial institution (<FI>) name and ID |
| Account | <BANKACCTFROM> | Routing number (<BANKID>), account number (<ACCTID>), and account type (<ACCTTYPE>: CHECKING, SAVINGS, CREDITLINE) |
| Transaction list | <BANKTRANLIST> | A start and end date (<DTSTART>, <DTEND>) followed by one <STMTTRN> per transaction |
| Balance | <LEDGERBAL> / <AVAILBAL> | The closing ledger balance and available balance, each with an amount and an as-of date |
Credit card downloads use <CREDITCARDMSGSRSV1> and <CCACCTFROM> instead of the bank tags, but the transaction block inside is identical.
The tags inside a STMTTRN transaction block
Each transaction is wrapped in a <STMTTRN> block. Four tags are required and the rest are optional detail. These are the fields that become your spreadsheet columns.
| Tag | Required | Meaning | Spreadsheet column |
|---|---|---|---|
| <TRNTYPE> | Yes | Transaction type: CREDIT, DEBIT, DEP, INT, FEE, SRVCHG, ATM, POS, XFER, CHECK, PAYMENT, DIRECTDEP, DIRECTDEBIT, or OTHER | Type |
| <DTPOSTED> | Yes | Posting date in YYYYMMDD, optionally followed by HHMMSS | Date |
| <TRNAMT> | Yes | Signed decimal amount, no currency symbol or thousands separator (negative for money out) | Amount |
| <FITID> | Yes | Financial institution transaction ID, unique in the file so re-imports do not duplicate | ID / reference |
| <NAME> | No | Payee or short description (usually capped near 32 characters) | Description |
| <MEMO> | No | Extra detail: check memo, merchant location, or transfer note | Memo |
| <CHECKNUM> | No | Check number when the entry is a written check | Check no. |
The amount sign is where OFX beats a scraped CSV: money leaving the account is negative and money in is positive, so debits and credits are unambiguous. The FITID is the second quiet win. Because it is unique, software matches on it, which is why importing the same OFX file twice does not create duplicate rows.
How do I read an OFX file?
Open the file in any plain-text editor (Notepad, TextEdit, or VS Code) and read it top to bottom. Find the <BANKACCTFROM> block to confirm the account, then scroll to <BANKTRANLIST> and read each <STMTTRN> in order: TRNTYPE tells you what it is, DTPOSTED the date, TRNAMT the signed amount, and NAME or MEMO the description. To turn it into rows, put one column per tag and one row per STMTTRN block.
An OFX file is human-readable, so you can audit any single transaction by eye. What it is not built for is math. To total a category, average a month, or reconcile against your books, you want the transactions as spreadsheet rows, which is where a conversion step earns its place.
SGML versus XML: the two OFX versions
OFX comes in two shapes and the difference trips up a lot of parsers. Versions 1.0 through 1.6 use SGML, where a tag can omit its closing counterpart. In practice a value looks like <TRNAMT>-1250.00 with no closing </TRNAMT>; the tag ends at the next line. Container elements like <STMTTRN> still have explicit closing tags. Starting with OFX 2.0 the format switched to proper XML: the header is an XML declaration and every tag must be closed, so the same value becomes <TRNAMT>-1250.00</TRNAMT>.
Both versions open with a header. The 1.x header is a block of colon-separated lines (OFXHEADER, DATA, VERSION, SECURITY, ENCODING, CHARSET) followed by a blank line and then the <OFX> root. If a generic XML tool chokes on your OFX file, it is almost certainly a 1.x SGML file being read as strict XML.
What is the difference between OFX and QFX?
A QFX file is an OFX file with Quicken-specific tags added. Intuit stamps the <FI> element with proprietary <INTU.BID> and <INTU.USERID> tags that tie the file to a paid Quicken Web Connect subscription, and Quicken checks for them on import. Everything else, including the STMTTRN blocks, is standard OFX. That is why converting a QFX file usually means stripping the Intuit header so other software will accept it. The OFX vs QFX vs QBO comparison covers which format each accounting app expects.
A worked OFX example mapped to Excel
Here is a single transaction inside a <BANKTRANLIST>, in OFX 1.x SGML:
<STMTTRN> <TRNTYPE>DEBIT <DTPOSTED>20260703 <TRNAMT>-1250.00 <FITID>202607030001 <NAME>RENT ACH DEBIT <MEMO>UNIT 4B JULY </STMTTRN>
That maps to one spreadsheet row:
| Date | Type | Description | Memo | Amount | FITID |
|---|---|---|---|---|---|
| 07/03/2026 | DEBIT | RENT ACH DEBIT | UNIT 4B JULY | -1250.00 | 202607030001 |
Repeat that for every <STMTTRN> and you have the full statement as rows, with the <LEDGERBAL> giving you the closing balance to check the running total against.
How do I convert an OFX file to Excel or CSV?
Upload the .ofx file to the OFX to CSV converter and it reads each STMTTRN block into Date, Description, Amount, Type, and FITID columns, then hands you a clean CSV or Excel file. That is the reliable path when you have several OFX files to merge, a year to reconcile, or a bank that only offers OFX when you need Excel. Going the other direction, to produce an OFX file from a PDF statement your software can import, use the bank statement to OFX converter. Once the transactions are in a sheet, producing month-end numbers from an accounting export is a job for a financial statement generator.
If you work across formats, the same structure ideas carry over: an ISO 20022 camt.053 file uses XML tags for the same balances and transactions, a BAI2 file uses numbered records, and a QIF file uses single-letter field codes. All four describe the same thing, a list of dated, signed transactions, in different clothing.
Ready to convert your bank statement?
Upload a PDF and get clean Excel or CSV in seconds. Works with statements from any bank.
Convert to Excel nowFree to try, no credit card required