Convert an MT940 file to OFX

In short: An MT940 file is the SWIFT bank statement many European banks offer for download. It is plain text in tagged fields, with decimal commas, D and C marks for money out and in, and a free-text description field whose layout differs by bank. OFX (Open Financial Exchange) is the standard bank statement file. Xero, GnuCash, Moneydance and many other programs import it without asking you to map columns. Drop the file below. It is converted on your device and never uploaded.

Convert your file

MT940 to OFX

A .sta, .940, .mt940 or .txt file from your bank's MT940 (SWIFT) statement download

Your file stays on this device

It is read and converted by this page, inside your browser. Nothing from the file is uploaded, and the converter keeps working offline once the page has loaded.

One email when it ships. The address is used for nothing else. Details.

1. Export the file from your bank

  1. In your online banking open the account and look for Statements, Export or Download.
  2. Choose the MT940 format (some banks call it SWIFT, MT940 structured or .sta).
  3. Pick the period and download.
  4. Upload the file here exactly as downloaded.

Why a raw MT940 export fails in Xero, Wave, GnuCash, Moneydance, MS Money and others

QuickBooks and Quicken read Web Connect files, not MT940. The statement has to be rebuilt as a .qbo file, with the account, the dates and a signed amount for each booking.

Programs that read OFX do not ask you to map columns, which avoids the date and sign mistakes a hand-mapped CSV invites. Payment apps rarely offer OFX themselves, so the file has to be built from their CSV.

What is unusual about the MT940 file

  • One file can hold many statements and several accounts. Each converted file holds one account in one currency; you choose which.
  • Amounts use a decimal comma (1234,56) and a D or C mark for money out or in. RD and RC mark reversals.
  • Each entry has a value date and usually a booking date; we use the booking date and keep the value date in the spreadsheet CSV.
  • We check every statement: the opening balance plus the entries must equal the closing balance. If it does not, you get a clear warning.
  • The description field (:86:) comes in several layouts. We read the German ?20 to ?63 subfields and the /NAME/ /REMI/ /EREF/ style used by Dutch banks, and keep anything else as plain text.

What Xero, Wave, GnuCash, Moneydance, MS Money and others requires

  • Plain OFX 1.0.2 SGML with no Intuit extensions.
  • One account and one currency per file.
  • Stable transaction ids: the same row in two overlapping exports gets the same id.

2. Before and after

Before: the MT940 statement as downloaded

:20:940S150209
:25:NL68RABO0123456789 EUR
:28C:0
:60F:C150206EUR000000005442,89
:61:150209C000000000300,00N541NONREF
NL75INGB0001234567
:86:/ORDP//NAME/Hr J DOE/ADDR/Ieplaan 100 2500AA S GRAVENHAGE
 NL/REMI/bijdrage februari 2014/ISDT/2015-02-09
:62F:C150209EUR000000005742,89

After: what Xero, Wave, GnuCash, Moneydance, MS Money and others receives

...
<STMTTRN>
<TRNTYPE>CREDIT</TRNTYPE>
<DTPOSTED>20150209120000</DTPOSTED>
<TRNAMT>300.00</TRNAMT>
<FITID>1E063BAD7E836350</FITID>
<NAME>Hr J DOE</NAME>
<MEMO>bijdrage februari 2014</MEMO>
</STMTTRN>
<STMTTRN>
<TRNTYPE>CREDIT</TRNTYPE>
<DTPOSTED>20150216120000</DTPOSTED>
<TRNAMT>300.00</TRNAMT>
<FITID>3026819D882E6A67</FITID>
<NAME>Hr J DOE</NAME>
<MEMO>Maandelijkse bijdrage februari</MEMO>
</STMTTRN>
...

Synthetic sample data that follows the real export layout, not a real account. The "after" output was produced from it by the same converter this page runs.

3. Import the converted file into Xero, Wave, GnuCash, Moneydance, MS Money and others

  1. In your accounting software open the bank account and choose Import statement (or File > Import > OFX).
  2. Choose this .ofx file.
  3. Review and confirm the transactions.

Questions

How do I know nothing went missing?
Every MT940 statement carries an opening and a closing balance. The converter adds up the bookings of each statement and compares the result with the closing balance. If they do not match, you see a warning that names the statement and the difference.
Which programs accept OFX files?
Xero, Wave, GnuCash, Moneydance and many desktop finance programs offer an OFX import. QuickBooks prefers .qbo and Quicken prefers .qfx; use those variants for Intuit products.
My file has several accounts. What happens?
One file can hold statements for several accounts or currencies. Each converted file holds one account in one currency, and a menu lets you pick which one. Convert each account into its own account in your books.
What happens with overlapping exports or repeated rows?
Each transaction gets an id built from its date, amount, description and platform id, so the same row in two overlapping exports gets the same id. Whether your software uses that id to skip a repeat is up to the software, so avoiding overlapping date ranges is still the safest habit. Within one file, exact repeats of the same platform transaction are dropped and the notes say how many.

Other ways to convert MT940

Other exports to OFX