
Convert CSV to OFX: Tools and Manual Methods
Published on July 11, 2026 by CapyParse Team
You have transactions in a CSV file or an Excel sheet, and the software you want to load them into (GnuCash, Banktivity, MoneyMoney, HomeBank, or an accounting platform that accepts manual OFX imports) wants an OFX file. CSV is the universal export format, but OFX is the universal import format for personal-finance and accounting tools, and the two are not interchangeable. This guide covers three honest ways to get from CSV to OFX: free open-source converter utilities, web-based converters, and building a minimal OFX file by hand. It also starts with a question that saves many people the trouble entirely: do you actually need OFX at all?
Quick Summary: 3 Methods (Plus a Shortcut)
- Check first: Many programs also accept CSV or QBO directly. If your destination is QuickBooks, you want QBO, not OFX.
- Method 1 (Open-Source Utilities): Command-line tools such as csv2ofx convert CSV to OFX for free, with full control over field mapping.
- Method 2 (Web Converters): Browser-based CSV-to-OFX tools are quick for one-off jobs, but check how each one handles your financial data before uploading.
- Method 3 (Manual Template): For a handful of transactions, paste values into a minimal OFX skeleton yourself. No tools required.
Do You Actually Need OFX?
Before converting anything, confirm that OFX is really the format your software wants. A surprising number of CSV-to-OFX searches end with the discovery that no conversion was needed. Work through these three checks first:
1. Does your software accept CSV directly? QuickBooks Online, Xero, Wave, YNAB, and most modern accounting platforms import CSV files natively. If yours does, cleaning up your CSV (consistent dates, no currency symbols, a header row) is far less work than converting it to OFX. OFX only becomes necessary for tools that import exclusively through OFX or its cousins, such as GnuCash workflows built around OFX, MoneyMoney on the Mac, Banktivity, HomeBank, and the manual statement import in some Xero regions.
2. Is your destination QuickBooks Desktop? Then OFX is the wrong target. QuickBooks Desktop imports QBO (Web Connect) files, which are Intuit's fork of OFX with extra metadata requirements, and it will reject a plain OFX file. Follow our CSV to QBO guide instead. If you are unsure which format your tool expects, our QBO vs OFX vs CSV comparison breaks down exactly what each format contains and which software reads which.
3. Is your real source a PDF bank statement? Many people converting CSV to OFX created that CSV from a PDF statement in the first place. If that is you, there may be a shorter path that skips the CSV middle step. Jump to the PDF section near the end of this guide.
Still need OFX? Here are the three methods, starting with the most robust.
Method 1: Free Open-Source Converter Utilities
The most reliable free option is the family of open-source CSV-to-OFX utilities, of which the Python tool csv2ofx is the best-known example. These are command-line programs: you install them once, point them at a CSV file, tell them which column is which, and they emit a valid OFX file. Because the code is open, you can inspect exactly what happens to your data, and everything runs locally on your machine. Nothing is uploaded anywhere.
Step-by-Step
1. Install the Tool
Most utilities in this category are Python packages installed with pip, though standalone scripts exist for other languages. You need a working Python installation and basic comfort with a terminal. If that sentence made you wince, skip ahead to Method 2 or 3.
2. Prepare Your CSV
Give the file a single header row and remove any summary lines, subtotals, or blank rows above or below the transaction data. Strip currency symbols and thousands separators from amounts, so a value reads 1250.00 rather than a formatted currency string. Starting from Excel? Use File, Save As, CSV UTF-8 first: this is the standard answer to every Excel-to-OFX question, because Excel has no OFX export of its own.
3. Map Your Columns
Tell the tool which CSV column holds the date, which holds the amount (or separate debit and credit columns), and which holds the payee or description. You also declare the date format your CSV uses so the tool can rewrite it into OFX form. Most utilities ship with prebuilt mappings for common bank exports and let you save a custom mapping for reuse next month.
4. Let the Tool Generate FITIDs
Every OFX transaction needs a FITID, a unique transaction identifier that importing software uses for duplicate detection. Your CSV almost certainly does not contain one, so the converter generates FITIDs, typically by hashing or combining the date, amount, and description. Check the tool's documentation for how it does this: stable, deterministic FITIDs mean you can re-run a conversion without creating duplicates on import.
5. Convert and Verify
Run the conversion and open the resulting OFX file in a text editor before importing it. Confirm the dates are in YYYYMMDD form, the amounts carry the right signs (money out negative, money in positive), and the transaction count matches your CSV. Then import into your finance software and spot-check a few entries.
Best for: Anyone comfortable with a command line, recurring monthly conversions, and anyone who does not want financial data leaving their machine.
Method 2: Web-Based CSV-to-OFX Converters
Several websites convert CSV to OFX in the browser: upload or paste your CSV, map the columns in a form, and download the OFX result. For a one-off conversion with no software installation, this is the fastest route, and free tiers are common.
The critical caveat is data handling. A CSV of bank transactions contains dates, payees, amounts, and often account numbers. Before uploading it to any website, check three things:
- Where is the processing done? Some converters transform your file entirely in the browser with JavaScript, so the data never leaves your computer. Others upload it to a server. The tool's documentation or privacy page should say which; if it does not say, assume server-side.
- How long is the file retained? Look for an explicit deletion policy. A converter that keeps uploaded financial files indefinitely is a poor trade for saving ten minutes.
- Is the connection encrypted? The page must load over HTTPS. This is table stakes, but it is worth confirming before you paste account data into a form.
If a tool passes those checks, the workflow mirrors Method 1 without the terminal: upload the CSV, assign the date, amount, and payee columns, pick your date format, and download the OFX file. As with any converter, open the output in a text editor and verify dates, signs, and the transaction count before importing.
Best for: One-off conversions where installing software is not worth it, and users who have verified the tool's data handling.
Method 3: Build a Minimal OFX File by Hand
OFX is just structured text. For a small one-off batch (say, a dozen transactions your software refuses to take any other way), you can build the file yourself in a text editor. Modern OFX 2.x is plain XML, which makes hand-editing entirely practical. Here is a minimal skeleton with one placeholder transaction:
<?xml version="1.0" encoding="UTF-8"?>
<?OFX OFXHEADER="200" VERSION="220" SECURITY="NONE"
OLDFILEUID="NONE" NEWFILEUID="NONE"?>
<OFX>
<SIGNONMSGSRSV1>
<SONRS>
<STATUS><CODE>0</CODE><SEVERITY>INFO</SEVERITY></STATUS>
<DTSERVER>20260711120000</DTSERVER>
<LANGUAGE>ENG</LANGUAGE>
</SONRS>
</SIGNONMSGSRSV1>
<BANKMSGSRSV1>
<STMTTRNRS>
<TRNUID>1</TRNUID>
<STATUS><CODE>0</CODE><SEVERITY>INFO</SEVERITY></STATUS>
<STMTRS>
<CURDEF>USD</CURDEF>
<BANKACCTFROM>
<BANKID>123456789</BANKID>
<ACCTID>000111222</ACCTID>
<ACCTTYPE>CHECKING</ACCTTYPE>
</BANKACCTFROM>
<BANKTRANLIST>
<DTSTART>20260601000000</DTSTART>
<DTEND>20260630000000</DTEND>
<STMTTRN>
<TRNTYPE>DEBIT</TRNTYPE>
<DTPOSTED>20260603000000</DTPOSTED>
<TRNAMT>-42.50</TRNAMT>
<FITID>20260603-42.50-001</FITID>
<NAME>EXAMPLE PAYEE</NAME>
</STMTTRN>
</BANKTRANLIST>
<LEDGERBAL>
<BALAMT>1250.00</BALAMT>
<DTASOF>20260630000000</DTASOF>
</LEDGERBAL>
</STMTRS>
</STMTTRNRS>
</BANKMSGSRSV1>
</OFX>
To use it: duplicate the STMTTRN block once per transaction, fill in DTPOSTED (date posted, in YYYYMMDD plus an optional time), TRNAMT (signed amount, negative for money out), FITID (a unique ID per transaction; date plus amount plus a counter works), and NAME (the payee or description). Set TRNTYPE to DEBIT or CREDIT to match the sign, adjust CURDEF to your currency, set DTSTART and DTEND to cover your date range, and update the LEDGERBAL block with the closing balance and its date. The BANKID and ACCTID values identify the account; placeholder digits are fine for most personal-finance imports, which map the file to an account you choose during import. Save with a .ofx extension and UTF-8 encoding.
Be aware that some older programs expect OFX 1.x, which is SGML rather than XML: it has a plain-text header block instead of the XML declaration, and closing tags are optional. If your software rejects a 2.x file, its documentation will usually say which version it wants.
Best for: A dozen or so transactions, learning what your importer actually reads, and debugging a converter's output when an import fails.
The Three Methods Compared
| Method | Cost | Technical Skill | Data Privacy | Best For |
|---|---|---|---|---|
| Open-source utilities | Free | Command line required | Fully local | Recurring conversions |
| Web converters | Often free | None | Varies; verify first | One-off jobs |
| Manual OFX template | Free | Careful text editing | Fully local | A dozen transactions or fewer |
Four Pitfalls That Break OFX Imports
Whichever method you choose, the same four issues cause the vast majority of failed or messy OFX imports. Check each one before you import.
Dates Must Be YYYYMMDD
OFX dates are written as YYYYMMDD, optionally followed by a time (20260711 or 20260711120000). A CSV date like 07/11/2026 must be rewritten, and an ambiguous source format (is 03/04 the 3rd of April or March 4th?) must be declared correctly in your converter, or every transaction lands in the wrong month.
FITIDs Must Be Unique
Importers use FITID for duplicate detection. If your generator produces the same FITID for two same-day, same-amount transactions, one of them is silently dropped. Include a sequence number or the description in the ID. Conversely, keep FITIDs stable across re-runs, or re-importing a corrected file creates duplicates.
Sign Conventions
In OFX, money out is negative and money in is positive, and TRNTYPE (DEBIT or CREDIT) should agree with the sign. Bank CSVs vary wildly: some use signed single columns, some use separate debit and credit columns, and credit card exports often flip the convention. Spot-check a known purchase after import; if it shows as a deposit, your mapping is inverted.
Header and Version Requirements
OFX 2.x files need the XML declaration and the OFX processing instruction at the top; OFX 1.x files need the older plain-text header block instead. A missing or mismatched header is a common reason software rejects a file outright. Match the version your importer documents, and save as UTF-8 without a byte-order mark.
Working From PDF Bank Statements?
CapyParse converts bank statement PDFs (scanned or digital) straight to clean CSV, Excel, or QBO files. No manual retyping, no column mapping.
Try CapyParse Free10 free pages. No credit card required. View pricing for higher volumes.
Starting From a PDF Statement Instead?
A lot of CSV-to-OFX journeys start one step earlier: with a PDF bank statement. The workflow becomes PDF to CSV, then CSV to OFX, then import. Every extra conversion step is another place for dates to shift, signs to flip, or rows to go missing, so it is worth asking whether the chain can be shortened.
To be clear about what CapyParse does and does not do: CapyParse converts PDF bank statements to CSV, Excel, and QBO. It does not convert CSV to OFX, so if you genuinely need an OFX file, use one of the three methods above. But if your source is a PDF, CapyParse can still remove steps from the chain in two common cases:
- Your destination is QuickBooks: Convert the PDF straight to QBO and the OFX question disappears entirely. QuickBooks Desktop imports the QBO file directly, and QuickBooks Online takes either QBO or CSV. Our guide to converting bank statements to QBO walks through it end to end.
- Your destination also accepts CSV: If your software imports both OFX and CSV, a clean, consistent CSV from the PDF is all you need. CapyParse outputs normalized dates and a signed amount column, which sidesteps the mapping problems that push people toward OFX in the first place.
And if your target is strictly OFX-only, the two-step route still improves: convert the PDF with CapyParse to get an accurate, well-structured CSV, then feed that CSV to an open-source converter from Method 1. A consistent CSV with unambiguous dates makes the OFX step nearly foolproof.
Frequently Asked Questions
Can I convert a CSV file to OFX for free?
Yes. Open-source command-line tools such as csv2ofx convert CSV to OFX at no cost, and for a small one-off batch you can paste transactions into an OFX template by hand. Free web-based converters also exist, but review how they handle your financial data before uploading anything.
What date format does OFX use?
OFX dates use the format YYYYMMDD, optionally followed by a time (for example, 20260711 or 20260711120000). Dates in any other format, such as MM/DD/YYYY, will cause imports to fail or land on the wrong day, so date conversion is the first thing to check when an OFX import misbehaves.
What is a FITID in an OFX file?
FITID stands for Financial Institution Transaction ID. It is a unique identifier attached to each transaction, and importing software uses it to detect duplicates. If two different transactions share a FITID, most programs silently skip the second one, so generated FITIDs must be unique. A common approach combines the date, the amount, and a sequence number.
Can Excel save a spreadsheet as an OFX file?
No. Excel has no native OFX export. The standard route is to save your worksheet as CSV (File, Save As, CSV UTF-8) and then run that CSV through an OFX converter. For a handful of transactions, you can instead copy the values into a hand-built OFX template.
Do I need OFX to import transactions into QuickBooks?
No. QuickBooks Online imports CSV files directly, and QuickBooks Desktop requires QBO (Web Connect) files rather than plain OFX. If QuickBooks is your destination, convert your CSV to QBO instead of OFX, or convert the original PDF statement straight to QBO and skip the CSV step entirely.
Skip the Conversion Chain
If your transactions live in a PDF bank statement, convert it once with CapyParse and get CSV, Excel, or QuickBooks-ready QBO in seconds.
Convert a Statement Free10 free pages. No credit card required. View pricing for higher volumes.
Related Articles
What Is an OFX File?
The format explained: structure, versions, and which software reads it.
How to Open an OFX File in Excel
Going the other direction: turn an OFX file into a usable spreadsheet.
Convert a Bank Statement to QBO
Go from PDF statement to QuickBooks-ready QBO with no intermediate files.
QBO vs OFX vs CSV: Which Format Should You Use?
Deep dive into the differences between financial file formats and when to use each one.