How to Convert a Bank Statement PDF to OFX
OFX is the file that Xero, MYOB, GnuCash and a dozen other finance programs ask for first when you import a statement by hand — and it is also the file most banks no longer offer as a download. A PDF statement is usually the only source left, especially for closed accounts and history older than a year or two. This guide shows how to convert a bank statement PDF to OFX with a bank statement converter: what the file looks like, how to check it balances, and how to get it into the software that reads it.
What an OFX file is — and why software asks for it
OFX stands for Open Financial Exchange. Microsoft, Intuit and CheckFree announced the standard in January 1997, and it has been the common language for moving transactions between banks and finance software ever since. The files this converter writes are OFX 1.02 in the older SGML form, because that is the shape nearly every importer still accepts without complaint.
What makes OFX different from a CSV is that every field is named. A CSV row is just values in an agreed order, and the import depends on you mapping each column by hand and telling the software which way the signs point. An OFX transaction carries its own labels: the posting date, the signed amount, the payee name, and a unique ID for the row. The software reads the labels instead of asking you questions, so a second import of the same file is recognised instead of added twice.
- Your software lists OFX as its recommended import format — Xero puts it first for manual statement imports, and MYOB, GnuCash, Sage, FreeAgent and Wave all read it.
- You are rebuilding history: months or years of statements that the bank no longer offers as downloads, where the PDF is the only copy.
- You are moving data between programs and want a file with a balance and unique IDs inside it, not a bare list of rows.
What an OFX file looks like
Open an OFX file in a text editor and it reads like a labelled list. A header block names the version and encoding, then a sign-on section, then the statement itself: the account, the transaction list with its start and end dates, and the ledger balance at the end. A bank statement uses the BANKMSGSRSV1 section; a credit card statement uses the same shape under CREDITCARDMSGSRSV1. Here is one transaction, decoded:
| Line | What it means | From the statement |
|---|---|---|
| <TRNTYPE>DEBIT | Money out (CREDIT for money in) | Whether the row was a debit or a credit |
| <DTPOSTED>20260304120000 | Posting date: 4 March 2026, noon stamp | The date column on the statement |
| <TRNAMT>-54.20 | Signed amount: negative, so money out | The debit and credit columns merged into one signed amount |
| <FITID>3F9A1C… | Unique ID for this one transaction | Built from the date, amount and description, so re-imports are recognised |
| <NAME>GROCERY MART | Payee, cut to 32 characters | The description, shortened for the name field |
| <MEMO>Grocery Mart — London | Full payee text, up to 255 characters | The whole description, kept in full |
Two details in that table cause most of the trouble people have with OFX. The first is the date: it is written year first, followed by 120000, a noon time stamp the format requires. The date is the first eight digits; the rest is padding. The second is the unique ID. Duplicate protection on re-import depends on that ID naming the transaction itself — its date, amount and description — rather than its position in the file.
One more thing the file does not carry: a bank routing number. Statements do not print one in a reliably readable position, and a made-up one would park the imported account under the wrong bank's name, so the file leaves it out. It carries the account's last four digits and the account type instead, and your software asks you to match the file to the right account when you import it.
Before you convert: OFX, QBO, QIF or CSV?
OFX is the right file only when the software on the other end asks for it. Pick the format by the destination, not by habit. QBO is the same OFX 1.02 file with an Intuit header added, and it is what QuickBooks Web Connect expects. QIF is the older plain-text format for GnuCash, Moneydance and old desktop software. CSV is the format for spreadsheets and for accounting systems that want you to map columns by hand. Our comparison of OFX, QBO and QIF formats works through the three in full; the short version is below.
| Format | Best for | What to watch |
|---|---|---|
| OFX | Xero, MYOB, GnuCash, Sage, FreeAgent, Wave, Moneydance, Banktivity | Named fields and unique IDs; a paid export on this site |
| QBO / QFX | QuickBooks (QBO) and current Quicken (QFX) Web Connect imports | Same OFX 1.02 body with an Intuit header; plain OFX may be refused there |
| QIF | GnuCash, Moneydance, older desktop software | No bank or account ID; dates are month-first — see our guide to converting a bank statement PDF to QIF |
| CSV | Excel, Google Sheets, accounting systems with column mapping | You map the columns yourself — see our guide to converting a bank statement PDF to CSV |
A word on MT940, because people search for it alongside OFX. MT940 is the SWIFT statement format that much European accounting software still imports. This converter does not produce MT940 files: its exports are CSV, Excel, QBO, OFX and QIF. If your software demands MT940 and nothing else, download it from your bank's online banking instead. If the software also accepts OFX, convert the PDF to OFX here and import that; the transactions are the same, only the wrapper differs.
OFX is a paid export on this site (Starter and Pro plans); CSV and Excel are free on every plan. That matters when you are choosing: if the destination is a spreadsheet, the free CSV is the better file anyway, because it keeps the running balance and the separate debit and credit columns that OFX folds into one signed amount.
How to Convert a Bank Statement PDF to OFX, Step by Step
- Get the digital PDF from your bank. Download the statement from online banking rather than scanning a paper copy: a digital PDF carries a real text layer, and a scan has to be read by OCR, which misreads digits more often than words. Our guide to scanned vs digital bank statements shows how to tell which kind you have.
- Open the bank statement converter and drop in the PDF. One account and one statement period per file — never mix two accounts in one OFX file, because the file names one account at the top and every transaction belongs to it.
- Review every row against the PDF page before you download anything. Look for a missed line, a doubled line, and any amount that does not match the page. Then read the balance check: the rows must reproduce the statement's closing balance before you go on.
- Choose OFX as the output. A checking or savings statement is written as a bank file and a credit card statement as a card file, automatically.
- Download the .ofx file and open it in a text editor for a ten-second look. The first lines should read OFXHEADER:100 and VERSION:102, each transaction should sit inside its own <STMTTRN> block, and the file should end with a <LEDGERBAL> carrying the closing balance.
- Back up the program you are importing into. Most imports cannot be rolled back in one step, so for desktop programs like GnuCash, Moneydance or MYOB, copy the data file before the first import. This takes a minute and saves an afternoon.
- Import one statement first, then check the ending balance in your software against the closing balance printed on the PDF. Only when that one month agrees should you import the rest.
Three cases need a word of their own. If the PDF is a scan, confirm the converter read it with OCR and check the figures, not just the dates. If the PDF is password-protected, unlock it once for the conversion; the password opens the file and is never stored — see our guide to password-protected bank statement PDFs. And if you have a year of statements, convert them in batches and import month by month; our guide to converting multiple bank statements at once shows how to keep the batch organised.
Check the file before you import it
Here is the step most people skip, and the step that matters most. Once an OFX file is inside your finance program, finding one misread amount among hundreds of imported transactions is miserable. Check first, while the file is still just text. The test is simple: opening balance, plus money in, minus money out, should equal the closing balance printed on the statement.
- Add the signed <TRNAMT> amounts in the OFX file and compare the total with the statement: opening balance plus the sum of the file should equal the closing balance, which is also printed in the file as <LEDGERBAL>.
- Count the transactions: the number of <STMTTRN> blocks should match the transaction count on the statement.
- Scan the dates and check the first and last transactions against the PDF: every <DTPOSTED> should fall inside the statement period, and a missing first or last line is the most common gap.
If the numbers refuse to agree, do not import and hope. Our guide on how to check a bank statement conversion explains the full checking routine, and our guide to why a bank statement does not balance lists the usual causes and how to hunt each one down.
Import the OFX file into your software
Xero
In Xero, open Accounting, then Bank accounts, open the account, and choose Import a Statement. OFX is the format Xero recommends first for a manual import, because the named fields and unique IDs remove the mapping step entirely. Two traps to avoid: the currency of the account in Xero must match the currency in the file, and a credit card statement must go into a credit card account — a card file imported into a bank account arrives with every sign reversed. Our guide to importing bank statements into Xero walks through the whole flow.
MYOB
In MYOB Business, go to Banking, then Bank transactions, then the import option, and choose the .ofx file. In AccountRight, the path is File, then Import Data, then Bank Statements. MYOB imports transactions dated from your opening balance month onward and after any lock date, so on a catch-up job convert from that month forward and leave earlier months out.
GnuCash
In GnuCash, choose File, then Import, then Import OFX/QFX, and select the .ofx file. The importer walks you through matching the file to an account and mapping payees to GnuCash accounts; take the mapping screen slowly on the first import, because the choices it remembers will shape every later one.
Sage and FreeAgent
Sage 50 and Sage Business Cloud both accept OFX through their bank statement upload, and FreeAgent takes it through its bank statement import as well. Wave, Moneydance and Banktivity read it the same way, through File, then Import. The pattern is the same in each: upload the file, confirm the account it belongs to, and let the software match the lines. Our guides to importing bank statements into Sage and importing bank statements into FreeAgent cover the per-program details.
Quicken — use QFX instead
Current Quicken expects QFX, its Web Connect flavour of OFX, for checking, savings and credit card accounts — a plain .ofx file may be refused where a .qfx file sails through. The difference is the header, not the transactions: QFX is the same OFX 1.02 body with Intuit's marker on it. Convert the same statement to QBO format instead, which carries that marker, and import the .qbo file. Our guide to importing bank statements into QuickBooks follows the same pattern of a balance-checked file first.
When the import goes wrong
| Problem | Likely cause | What to do |
|---|---|---|
| Software says the file is invalid or empty | The file was edited by hand, or the download was damaged | Download a fresh .ofx from the converter and import it untouched — never edit or re-save an OFX file by hand |
| Money out shows as money in | A card file was imported into a bank account, or the reverse | Delete the bad import, then import the file into the matching account type |
| The same lines appear twice | The period overlaps a previous import, or the file was imported twice | Start the next file the day after the last transaction already in the program; the unique IDs usually flag the overlap |
| The ending balance is off by one row | A line was missed or read twice in the conversion | Compare the file total with the statement; find the missing or doubled row in the preview and re-convert |
| Quicken refuses the file | Current Quicken wants QFX for bank and card accounts | Convert the same statement to QBO format instead and import the .qbo file |
The pattern behind most of these is the same: the file was imported before it was checked. An OFX file is plain text, so every one of these problems can be seen — and fixed — before the file touches your books. When in doubt, fix the file, delete the bad import, and import again.
A short decision rule
If your software lists OFX as an import format, convert the PDF to OFX, check it against the statement balance, and import one month at a time. If your destination is current Quicken or QuickBooks, choose QFX or QBO instead — plain OFX may be refused. If the destination is a spreadsheet, a CSV is the better file: it keeps the running balance and the separate debit and credit columns OFX folds into one signed amount. The format is a means, not the goal: the right file is the one that gets your books to add up with the least repair work.
Sources and further reading
- Open Financial Exchange — Wikipedia
- Import bank transactions using Web Connect files — Intuit QuickBooks Support
- Import a bank statement — Xero Central
Put it into practice
Convert a statement now and watch the balance check run on your own file. The first 10 pages each month are free, and exports are never cut short.
More guides
How to Convert a Bank Statement PDF to CSV · How to Convert a Bank Statement PDF to Excel · How to Import Bank Statements into QuickBooks (QBO Files) · OFX vs. QBO vs. QIF: Which Format Should You Download? · Why a Converted Bank Statement Does Not Balance — and How to Fix It · How to Check a Converted Bank Statement Is Correct · Scanned vs. Digital Bank Statements: Why One Converts and the Other Does Not · How to Convert a Password-Protected Bank Statement PDF · How to Convert Many Bank Statements at Once (and Merge Them Cleanly) · Is It Safe to Convert Bank Statements Online? A Privacy Checklist · How to Import Bank Statements into Xero · How to Reconcile a Bank Statement in Excel After Converting PDF to CSV · How to Import Bank Statements into Sage from a PDF · How to Import Bank Statements into FreeAgent from a PDF · How to Import Bank Statements into Zoho Books from a PDF · How to Import Bank Statements into Wave from a PDF · How to Convert a Credit Card Statement to CSV (From a PDF) · How to Convert a Bank Statement PDF to QIF