Kayabyte

How to convert a PDF bank statement to OFX

By Kayabyte · Last updated 28 October 2026

OFX (Open Financial Exchange) is the file format banks use to hand transactions to money software. Many programs read it, including GnuCash, Microsoft Money-era tools, and various budgeting and accounting apps, while Quicken and QuickBooks use close relatives of it (QFX and QBO). If you only have a PDF statement, you need to get the transactions into OFX yourself. This guide explains what OFX contains, how to do it by hand, and where it gets risky.

1. See if your bank offers OFX

In online banking, look for a download option listing OFX, QFX, “Money” or “Quicken” formats. The exact labels vary by bank. Banks that offer QFX are effectively giving you OFX. If you can get it, use it: the file is complete and carries the right bank details.

Many banks limit the date range, or offer only CSV. Then you have to build the file.

2. What an OFX file needs

OFX is a text file with tags, either older SGML-style (version 1.x) or XML (version 2.x). The parts you can’t skip:

The unique FITID matters most. Money software uses it to recognize a transaction it has already imported, so the same ID must never be reused for a different transaction, and should stay the same for the same transaction if you re-import.

3. Building one by hand

You can write an OFX file in a text editor, starting from a sample exported by any program. In practice:

  1. Get the transactions into a spreadsheet first (see How to convert a PDF bank statement to CSV).
  2. Convert dates to the OFX form, YYYYMMDD, and amounts to plain numbers with a dot as decimal separator and a minus for debits.
  3. Generate a unique ID per row. A spreadsheet formula can combine date and row number.
  4. Wrap each row in the transaction tags and paste them into the template.

Mistakes here are easy and unforgiving: an unescaped ampersand in a payee name, a date in the wrong form, or a missing closing tag can make the program refuse the file, usually with a vague error. The tag details vary by OFX version and by what your target program accepts. This is a good fit for a script, a poor fit for a one-off by hand.

4. Check before you import

Opening balance plus the transactions should equal the closing balance. If your target program shows a running balance after import, compare it with the statement. Import into a test file or a new account first, so a bad import can be thrown away.

5. Where Balanced helps

Balanced is a Mac app we make that reads the PDF and writes OFX for you. You open the statement, check the table in the preview, then choose OFX in the export step.

Download Balanced and convert for free: the free version converts and checks everything and exports the first 10 transactions per file. That is enough to test an import in your own program before you pay. Pro is USD 59 per year or USD 7.99 per month, up to 3 Macs, with a 30-day money-back on the first payment. See pricing.

Limits

Whether your program accepts the file also depends on the program; we can’t test every version of every one. Results depend on the statement layout, so always check the preview. Heavily skewed or low-quality scans can fail, and a password-protected PDF has to be unlocked first with the password from your bank. Requires macOS 14 or later.