Guides

What is an OFX file? The OFX format explained

If your bank has a “Download transactions” button, one of the options is often OFX. Here's what that file format is, what's inside it, and what you can do with it.

Open Financial Exchange in brief

OFX stands for Open Financial Exchange, a specification introduced in 1997 by Microsoft, Intuit and CheckFree for exchanging financial data between banks and software. It covers both direct connections between apps and banks and downloadable files, and the downloadable .ofx file is how most people encounter it today: a statement of bank or credit-card transactions that personal finance and accounting software can import.

The same format also appears under other extensions. Banks label OFX downloads meant for Quicken as .qfx and those meant for QuickBooks as .qbo, but the structure inside is the same.

OFX 1.x and 2.x

There are two broad generations of the format. OFX 1.x files, such as versions 1.0.2 and 1.0.3, start with a plain-text header — lines like OFXHEADER:100 and DATA:OFXSGML — followed by SGML markup in which simple fields don't need closing tags. OFX 2.x files are XML: they begin with an XML declaration and an <?OFX ...?> processing instruction, and every tag is closed.

Banks still produce both generations, so software that reads OFX generally needs to accept either.

How the data is organized

Everything sits inside an <OFX> root element. A sign-on section (<SIGNONMSGSRSV1>) records the server response and often the institution. Bank statements live in <BANKMSGSRSV1> and credit-card statements in <CREDITCARDMSGSRSV1>. Within a statement you'll find the currency (<CURDEF>), the account (<BANKACCTFROM> or <CCACCTFROM>), a transaction list (<BANKTRANLIST>) and balances such as <LEDGERBAL>.

Each transaction is a <STMTTRN> block with a type (<TRNTYPE>, for example DEBIT or CREDIT), a posted date (<DTPOSTED>, written as YYYYMMDD with an optional time and time zone), an amount (<TRNAMT>, negative for money going out), a unique transaction ID (<FITID>), and a payee name and memo (<NAME>, <MEMO>).

What OFX is good for, and what it isn't

OFX works well for moving transactions into finance software: amounts are exact, dates are unambiguous, and the FITID lets importers recognize transactions they've already seen. It isn't designed to be read directly, though — opened in Excel or a text editor it's a long run of nested tags.

Converting the file to CSV or Excel gives you one row per transaction. Bankfile's OFX converters read both SGML and XML OFX bank and credit-card statements, run entirely in your browser, and never upload the file. Investment and tax sections of the OFX specification are outside their scope.

Convert this format

Related guides