How to Import an OFX File into GnuCash
Jul 19, 2026
Convert your bank statement to OFX now
PDF, JPG, PNG, BMP, HEIC, TIFF
Upload your bank statement
Drop file here or click to upload
PDF, JPG, PNG, BMP, HEIC, TIFF
Uploading...
All data: Extracts every table and text field from each page.
TL;DR: In GnuCash, go to File then Import then Import OFX/QFX, pick your file, and map it to the right account. GnuCash reads OFX natively through the AqBanking library, matches transactions by their unique ID so re-imports do not duplicate, and shows you a match screen where you confirm or reassign each entry before it posts. If your bank only gives you a PDF, convert it to OFX first, because GnuCash has no PDF import.
How do I import an OFX file into GnuCash?
Open your GnuCash file, then choose File, then Import, then Import OFX/QFX. Select the .ofx or .qfx file in the dialog. GnuCash parses it and opens the Import Matcher, a review screen listing every transaction it found. Assign the destination account, check the proposed matches, and click OK to post them to the register.
The Import Matcher is the part worth slowing down for. It is not a progress bar, it is a decision screen, and what you do there determines whether your books stay clean.
Understanding the Import Matcher
GnuCash marks each incoming transaction with one of three actions, shown as columns you can toggle:
| Action | What it means | When to override it |
|---|---|---|
| A (Add) | New transaction, will be created | If you can see it already exists in the register, switch to Update or Clear |
| U+R (Update and Reconcile) | Matches an existing entry, will update and mark it cleared | If the highlighted match is the wrong transaction, pick the right one |
| R (Reconcile) | Matches exactly, just mark it cleared | Rarely needs changing |
A yellow or red match confidence bar means GnuCash is unsure. Those are the rows to actually look at. Green rows are usually safe to accept. The common mistake is clicking straight through the matcher, which is how a payment gets matched to the wrong invoice or a genuine second identical charge gets absorbed into the first.
Will importing the same OFX twice create duplicates?
Generally no. OFX gives every transaction a unique ID called a FITID, and GnuCash stores that ID against the transaction when it imports. Re-import a file covering the same period and GnuCash recognizes those IDs and proposes to reconcile rather than add. This is the main practical advantage of OFX over a CSV import, where no such identifier exists and every re-import genuinely does duplicate.
The protection is not absolute. Some smaller institutions generate a new FITID each time you download, which defeats the matching. If you see a full screen of Add actions on a period you already imported, that is what happened. GnuCash falls back to matching on date and amount within a tolerance window, so most of those rows will still be caught, but check the ones flagged yellow before accepting.
Can GnuCash import a PDF bank statement?
No. GnuCash imports OFX, QFX, QIF, and CSV. There is no PDF import, and there is no plugin that adds one reliably. If your bank gives you PDF statements only, which is common once a statement is more than 90 days old, you need to produce an importable file from the PDF first. Converting the statement to OFX with a bank statement to OFX converter keeps the FITID based duplicate protection that makes the GnuCash import safe. Converting to CSV also works but loses that protection, so you have to be disciplined about non overlapping date ranges.
This is the situation most people hit when catching up on a prior year. The bank feed reaches back a few months at best, and everything older exists only as statement PDFs.
Why is my OFX import failing in GnuCash?
A handful of causes account for nearly all failures:
- AqBanking not installed. GnuCash handles OFX through the AqBanking library. If the Import OFX/QFX menu item is missing or greyed out, your build was compiled without it. On Linux, install the gnucash AqBanking package for your distribution; on Windows and macOS the official installers include it.
- Malformed file. A truncated download or a file edited by hand will fail to parse. Open it in a text editor and confirm it starts with an OFXHEADER block and that the transaction tags look intact.
- Wrong file extension. Some banks serve OFX content with a .qbo or .txt extension. Renaming to .ofx usually resolves it, since the content is what matters.
- Encoding problems. Non ASCII characters in payee names can break parsing on older builds. The OFXHEADER declares the character set, and a mismatch between the declaration and the actual bytes causes errors.
- Empty date range. If the file contains no transactions for the period, GnuCash reports success but imports nothing. Check the file actually has transaction blocks in it.
Which account does GnuCash import into?
On first import, GnuCash asks you to pick the target account and then remembers the association between that account and the OFX account identifier in the file. Subsequent imports from the same bank account go there automatically. If you picked wrong the first time, you can correct the mapping by editing the account and clearing its online ID, then re-importing and selecting the right account.
Getting this right on the first import saves real work later. Transactions posted to the wrong account have to be moved individually, and if you have already reconciled around them, the reconciliation has to be unwound first.
OFX or QIF for GnuCash?
Prefer OFX. GnuCash supports both, but QIF has no transaction IDs and no account identification, so it offers none of the duplicate protection and requires you to specify the account every time. QIF is worth using only when it is the only format you can obtain. If you are producing the file yourself from a statement, produce OFX. The QIF converter exists for the cases where a program genuinely requires the older format, but GnuCash is not one of them.
A clean monthly routine
The workflow that holds up over time: download or convert the statement to OFX, import through File then Import then Import OFX/QFX, work through the Import Matcher paying attention to yellow and red rows, accept, then immediately reconcile the account against the statement closing balance. Reconciling in the same session as the import is what catches problems while you still remember the context.
If your OFX imports cleanly but the reconciled balance is off, the gap is almost always a missing statement period rather than a bad import. Check that your imported date ranges are contiguous with no gaps between statements.
Once the transactions are in and reconciled, the ledger is doing its job. Turning that into something a lender or a partner wants to read is a separate step, and if you need presentation ready output rather than a register view, you can take the bookkeeping export and generate a proper P&L and balance sheet from it without rebuilding the numbers by hand.