CSV to OFX means rewriting a spreadsheet-style list of transactions as an OFX file, with tags for date, amount, name and a unique ID. Xero imports a correctly laid out CSV directly, so most Xero users should keep the CSV. Convert only when the program receiving the file will not take CSV.
Does Xero really need OFX instead of CSV?
No. Xero's statement import takes a CSV file, so a CSV with the right columns does not need converting to OFX. The advice to convert usually comes from an import that failed, and a failed CSV import almost always traces back to the file's layout, not to the CSV format itself.
Why a CSV import fails
Four problems account for most failures, and none of them is cured by changing the format:
- The date order does not match the Xero organisation, so lines land in the wrong month.
- Debit and credit sit in two columns instead of one signed amount.
- A comma inside a payee name splits a row.
- The header row is missing or altered.
Each is fixed in the CSV, and the column guide for Xero's CSV import walks through them. Converting a broken CSV to OFX only carries the same mistakes into a file that is harder to read.
Two lists: keep the CSV or convert
| Keep the CSV when | Convert to OFX when |
|---|---|
| You are importing into Xero | The receiving program accepts OFX but not CSV |
| You want to read and edit the rows | You must supply a unique ID for each line |
| The file imports with a few layout fixes | You import overlapping periods and need repeats recognised |
| You convert a few times a year | Someone else's process demands an OFX file |
If most answers fall on the left, stop here. The rest of this post is for the right-hand column.
Starting from a PDF
If your transactions are still on a PDF, you do not need a CSV-to-OFX step at all. Convert the PDF to a CSV first, and import that. The route for Xero is in importing a PDF bank statement into Xero. For the step-by-step on Xero's screens, see importing a bank statement into Xero.
Which software takes OFX but not CSV?
No general list answers this reliably, because whether a program takes CSV is a fact about that one program. Check its import screen or its help pages before you build a file for it, and do not assume from the program's age or price.
How to find out in five minutes
- Open the program's import or bank-file screen.
- Read the list of accepted file types, which is often shown in the file picker.
- Search the help pages for the program's name plus "import CSV".
- If CSV is listed, use it. If only OFX, QFX or QBO is listed, you need a conversion.
Note that QFX and QBO are variants of OFX with extra fields added for Quicken and QuickBooks. A program that asks for QFX may refuse a plain OFX file, and the reverse can be true. The conversion for Quicken is covered in converting CSV to QFX.
Banks and portals that ask for OFX
Occasionally a lender, a tax preparer or a portal asks for an OFX file. They are usually after a standard format that their own system can read. Ask what they will do with the file, and whether a CSV with named columns would do. If they insist, build the OFX as described below.
When a spreadsheet is enough
If the only reason for OFX is that you want a record of the statement, a CSV or a PDF does that job. Keep the original PDF, keep the CSV, and skip the conversion.
Filling OFX fields a CSV doesn't have
A CSV has columns for date, amount and description, but an OFX file also needs a transaction ID, a transaction type, and details about the bank and the account. You supply those yourself when you convert. The table shows each field, what it is, and where the value comes from.
Field table
| OFX field | What it is | What to fill in from your CSV |
|---|---|---|
| DTPOSTED | Date posted, year-month-day | Your Date column, rewritten as 20260302 |
| TRNAMT | Signed amount | Your Amount column, minus for money out |
| TRNTYPE | Credit or debit | CREDIT if the amount is positive, DEBIT if negative |
| FITID | Unique transaction ID | Not in the CSV. Build it: date plus a sequence number |
| NAME | Payee or short text | Your Payee column |
| MEMO | Extra text | Description and reference, joined |
| Account number | Which account the file is for | Last digits of the account, from the statement |
| Bank ID | Identifies the bank | A routing number or a placeholder your tool accepts |
| Closing balance | Balance after the last line | Printed on the statement |
The values here are examples. Different programs are strict about different header fields, so read what yours requires.
Building the ID
The ID is the field most people get wrong, because a CSV does not have one. Build it from data that will not change: the posting date, then a number for the position of the transaction within that day. Two coffee purchases on March 4 become 20260304-1 and 20260304-2. Keep the same method every time, so converting the same row again gives the same ID. The reasons are set out in OFX transaction IDs and duplicate imports.
The account fields
Use the real last digits of the account when the program asks for them. Do not paste a full account number into a file you will share. If a program accepts any placeholder for the bank ID, use one, but try the import with a small file first, because a wrong bank ID can make the program refuse the whole file.
CSV to OFX on a Mac or in Excel
You can do CSV to OFX on a Mac or in Excel by hand, but neither Excel nor Numbers saves OFX. You build the tagged text in a spreadsheet column, copy it into a plain text file, add header and footer lines, and save it with an .ofx ending. It suits a small file; a long statement is slow.
A spreadsheet recipe
- Keep your CSV columns: Date, Amount, Payee, Description.
- Add a column for the date as year-month-day text.
- Add a column for the ID, built from the date and a sequence number.
- Add a column that joins everything into tags, using a text-joining formula. Each row becomes the block from the opening STMTTRN tag to its closing tag.
- Copy that column and paste it into a plain text editor, between the header lines and the closing tags of the file.
- Save as plain text with the .ofx ending.
On a Mac, use a plain text mode in your editor so it does not add rich formatting, and check the file did not pick up a .txt ending as well. A file named statement.ofx.txt will not be recognised.
Online converters
A search for "csv to ofx online" finds websites that do the conversion. Before you upload a financial file, read what the site says about how long it keeps files. Remove names and account numbers you do not need to send. Try a file of dummy data first and open the result in a text editor to see whether the tags look like the ones above.
What SimpleBankConvert does and does not do
SimpleBankConvert is built to produce CSV and QBO files, not OFX, and recommends CSV for Xero. It is not open yet, and the get started page lets you join the list.
CSV to OFX conversions that scramble dates
Conversions scramble dates when the tool guesses the order of day and month, or when Excel has already changed the date before you save. The converted file then holds valid but wrong dates, so nothing warns you. Fix the dates in the CSV before converting, and check them after.
The usual causes
- Day and month swapped. 04/03/2026 is March 4 in one convention and April 3 in another, and the tool picked the wrong one.
- Two-digit years. A year written as 26 may be read as 1926 or 2026.
- Excel's display format. Excel shows dates in your computer's regional style, and saves the CSV in that style. A file made on a day-first computer reads wrongly in a month-first tool.
- Text dates with month names. A value like 4 Mar is missing its year.
A fix that works
Write every date in the CSV as year-month-day, for instance 2026-03-04. In that order the day and month can never be confused. Format the column as text before saving, so Excel does not change it back. Then the conversion to the OFX form, 20260304, only removes the dashes.
Checking after conversion
Pick three transactions, one early, one in the middle and one late in the statement, and compare their dates with the original statement. Include one with a day above 12, since a swap hides on days 1 to 12. Then add up the amounts and compare with the closing balance. If both checks pass, import it. If you are importing into Xero and the dates still look odd, go back to the plain CSV, which Xero reads directly.