LOCAL PARSER · STATEMENTS

MT940 to CSV Converter

Convert parsed MT940 transaction rows into downloadable UTF-8 CSV.

● Browser-only processing

01 / SOURCE

02 / REPORT

Recent history

Method and formulas

The same MT940 parser produces stable date, direction, amount, transaction code, reference and narrative columns with RFC-style CSV escaping.

Use test or appropriately protected data. Parsing is local, but data can still be visible on your screen and in browser memory.

Verify decimal signs, date century and proprietary transaction details before import.

GUIDE

What this tool does

MT940 files follow the SWIFT standard for delivering end-of-day bank statements containing opening balances, individual transaction movements, and closing balances. This converter extracts each movement line and maps it to CSV rows containing date, direction, amount, transaction code, reference, and narrative fields. It is intended for accountants, treasury teams, and developers who receive MT940 statements from corporate banks and require a machine-readable UTF-8 CSV for import into ERP systems or reconciliation spreadsheets. Processing occurs locally in the browser so the original statement never leaves the device, although users must still treat screen-visible data as sensitive.

The parser recognizes the mandatory tags :20: for transaction reference, :25: for account identification, :60F: for opening balance, repeated :61: and :86: pairs for movements, and :62F: for closing balance. Each :61: line supplies the value date, direction indicator, amount, and transaction type code while the following :86: line supplies the narrative. The resulting CSV uses RFC 4180 quoting rules so that commas or quotation marks inside narratives do not break downstream parsers.

Worked example with realistic numbers

Consider the following MT940 fragment that begins with a corporate account holding an opening balance of 1000.00 EUR. The statement records one debit of 25.50 EUR on the next business day. After local parsing the tool emits four columns plus the narrative column shown below.

DateDirectionAmountCodeReferenceNarrative
2026-07-23D25.50NTRFNONREF//REF-1Sample transfer

The opening and closing balances are recorded in separate header rows so that reconciliation scripts can verify the arithmetic 1000.00 minus 25.50 equals 974.50 without manual inspection of the original tags.

Second worked example

A second MT940 fragment shows a multi-currency corporate account starting at 5000.00 USD with two credits and one debit. The converter produces the rows below while preserving the original USD currency code in the header.

DateDirectionAmountCodeReferenceNarrative
2026-07-24C1200.75S051INV-882//CUST-44Invoice payment received
2026-07-25D350.00NTRFNONREF//PAY-77Supplier settlement
2026-07-25C75.25FCHGFEES//BANK-01Interest credit

Header rows record opening balance 5000.00 USD and closing balance 5926.00 USD, allowing automated verification that net movements equal plus 926.00.

Formula and method table

Input tagParsed elementOutput columnUnit or format
:60F:Opening balanceheader rowEUR with two decimals
:61: positions 1-6Value dateDateYYYY-MM-DD
:61: position 7DirectionDirectionD or C
:61: positions 8-AmountAmountDecimal with point
:61: positions after amountTransaction codeCodeFour-character SWIFT code
:86:NarrativeNarrativeFree text, RFC escaped
:62F:Closing balanceheader rowEUR with two decimals
:25:Account IDheader metadataIBAN or account string

Units and conversions notes

MT940 amounts always use a comma as the decimal separator and omit the thousands separator. The converter normalizes these to a period decimal point for CSV compatibility. Dates are supplied as YYMMDD; the parser assumes the current century unless the year is below 50, in which case it treats the year as 20xx. Currency codes are taken from the balance lines and written once in the CSV header. No currency conversion is performed; the output retains the original currency reported by the bank.

Transaction codes such as NTRF or S051 remain unchanged so that downstream rules can still classify payments by SWIFT type. Narrative lines may contain multiple sub-fields separated by slashes; these are preserved verbatim inside CSV quotes. All numeric fields use plain decimal representation without currency symbols or grouping characters.

Limitations

The parser does not validate the checksum between opening balance, movements, and closing balance. Users must perform that check after import. Proprietary bank extensions inside :86: or additional tags such as :64: are ignored. Only UTF-8 output is generated; legacy code pages are not supported. The tool does not decrypt or handle password-protected MT940 containers sometimes supplied by certain banks. Multi-statement files containing more than one :20: block are processed as separate logical statements but may require manual splitting for very large files. Field lengths exceeding 350 characters in :86: are truncated to protect spreadsheet compatibility. No support exists for structured SEPA or ISO 20022 remittance data embedded inside narratives.

Common mistakes

Users frequently forget that some banks emit a comma instead of a period in the amount field, leading to import errors if the CSV is opened directly in locale-aware spreadsheet software. Another frequent error is assuming the value date in :61: is the booking date; the two may differ by one or two business days. Narratives containing line breaks must be reviewed because the CSV writer converts them to spaces to maintain a single-row-per-transaction layout. Overlooking the separate header rows for balances can cause reconciliation scripts to miss the arithmetic verification step. Treating the four-character transaction code as a unique identifier leads to duplicate detection failures when banks reuse codes across unrelated movements. Failing to inspect the reference column for embedded slashes may break downstream matching rules that expect clean identifiers. Finally, assuming all statements use the same century rollover rule for YYMMDD dates produces incorrect years on statements issued near century boundaries.

Frequently asked questions

How does the parser decide the century for YYMMDD dates found in :61: lines?

The parser applies a 50-year pivot: years 00-49 become 2000-2049 while 50-99 become 1950-1999. This matches the convention used by most European banks issuing MT940 statements.

What happens when a :86: narrative contains both a slash-delimited reference and free text?

The entire :86: content is placed in the Narrative column after RFC 4180 escaping. No attempt is made to split sub-fields because bank-specific layouts vary widely.

Does the converter adjust amounts for debit and credit signs when direction is D or C?

Direction is emitted as a separate column. Amount values remain positive; sign interpretation is left to the importing application using the Direction column.

How are multi-currency statements handled if :60F: and :62F: show different currency codes?

The parser records the currency from the first balance tag and writes it in the CSV header. Subsequent movements are assumed to use the same currency; mixed-currency files require manual splitting before conversion.

Can the tool detect missing closing balance verification?

No arithmetic check between opening balance, movements, and closing balance is performed. Users must run a separate reconciliation step after CSV import.

What CSV quoting rules are applied to fields containing quotation marks?

Any field containing a double quote is wrapped in double quotes and internal quotes are doubled according to RFC 4180, ensuring correct parsing by standard CSV readers.

Are :64: forward available balance lines included in the output CSV?

Lines beginning with :64: are skipped because they represent projected rather than booked movements and would duplicate or contradict the :62F: closing balance.

What should be checked before importing the CSV into an accounting package that expects booking dates?

Compare the value date column against any separate booking date information supplied by the bank outside the MT940 file, because value dates can differ from posting dates by several days.