Executive Summary: The Universal Global Banking Standard
The SWIFT MT940 (Customer Statement Message) is the international standard format for electronic transmission of end-of-day bank statement data. Established under the ISO 15022 financial messaging specification and governed by the Society for Worldwide Interbank Financial Telecommunication (SWIFT), the MT940 protocol is utilized by virtually every major global banking institution—including JPMorgan Chase, Deutsche Bank, HSBC, BNP Paribas, and Barclays—to deliver corporate cash management data to enterprise customers.
Unlike consumer CSV or PDF statements, the MT940 format is a plaintext, tag-delimited flat-file specification optimized for straight-through processing (STP) into enterprise resource planning (ERP) suites such as SAP S/4HANA, Oracle NetSuite, and Microsoft Dynamics 365.
However, financial institutions frequently implement proprietary variations within standard MT940 tags—most notably within the transaction narrative field (Field :86:). Understanding the underlying grammar, tag hierarchy, and balance verification algorithms of the MT940 format is essential for software developers, treasury architects, and systems integration consultants.
This guide provides an exhaustive technical analysis of the SWIFT MT940 message grammar, deconstructs its constituent tags, and details automated parsing strategies.
Complete MT940 Tag Hierarchy & Message Grammar
An MT940 message is composed of standardized, colon-delimited field tags. Tags must appear in a strictly enforced hierarchical sequence:
| Tag | Field Name | Status | Multiplicity | Description |
|---|---|---|---|---|
| :20: | Transaction Reference Number | Mandatory | 1 | Unique message identifier generated by the sender bank (up to 16 characters). |
| :21: | Related Reference | Optional | 0..1 | Links statement to a prior inquiry or batch transaction instruction. |
| :25: | Account Identification | Mandatory | 1 | IBAN or proprietary bank account number of the statement holder. |
| :28C: | Statement Number / Sequence | Mandatory | 1 | Statement sequence number and sheet sequence (e.g., 00012/001). |
| :60F: | Opening Balance (Final) | Mandatory | 1 | Booked balance at the start of the reporting cycle (Indicator, Date, Currency, Amount). |
| :61: | Statement Line | Optional | 0..N | Atomic transaction record (Date, Currency, Amount, Transaction Type Code). |
| :86: | Information to Account Owner | Optional | 0..N | Detailed transaction narrative, counterparty details, and remittance references. |
| :62F: | Closing Balance (Final) | Mandatory | 1 | Booked closing balance at the end of the reporting cycle. |
| :64: | Closing Available Balance | Optional | 0..1 | Immediately available clearing balance including pending intraday floats. |
Deconstructing Core MT940 Tags
1. Tag :60F: & :62F: — Balance Specification
The opening balance (:60F:) and closing balance (:62F:) adhere to an identical grammar:
:60F:C260301USD1450200,50
Grammar Breakdown:
CorD: Credit/Debit Indicator (1 character).Crepresents a positive asset balance;Drepresents an overdraft or liability.260301: Value Date inYYMMDDformat (6 digits). March 1, 2026.USD: Currency Code in ISO 4217 standard (3 alpha characters).1450200,50: Balance Amount (Variable length). In SWIFT MT standards, the comma (,) is strictly utilized as the decimal separator, never a period (.).
2. Tag :61: — Statement Line Syntax
The :61: tag encapsulates the financial metadata of an individual transaction:
:61:2603150315CR45000,00NTRFNONREF//INV-99482
Subfield Grammar Breakdown:
- Value Date (
260315):YYMMDD(March 15, 2026). - Entry Date (
0315):MMDD(Optional, March 15). - Debit/Credit Mark (
CRorDR):D: DebitC: CreditRC: Reversal of DebitRD: Reversal of Credit
- Funds Code: Optional currency component.
- Amount (
45000,00): Decimal amount separated by comma. - Transaction Type Identification Code (
NTRF):- 1st character:
S(SWIFT transfer),N(Non-SWIFT transfer),F(First advice). - Next 3 characters: Transaction code (e.g.,
TRFfor transfer,CHKfor check,COLfor collection).
- 1st character:
- Reference for the Account Owner (
NONREF): Up to 16 characters. - Account Servicing Institution Reference (
//INV-99482): Subfield initiated by double slashes.
3. Tag :86: — Information to Account Owner
Following each :61: line, the :86: tag provides narrative context:
:86:?00MERCHANT SETTLEMENT?20STRIPE PAYMENTS?21REF: 9948201948?30021000021?32ACME HOLDINGS LLC
Structured Subfield Delimiters:
Leading European and North American banks format Field 86 using question mark delimiters (?xx):
?00: Transaction Type Description?20to?29: Remittance details and customer reference numbers?30: Bank Routing Code / Sort Code?31: Counterparty Account Number / IBAN?32: Counterparty Name
Canonical MT940 Message Sample
Below is a complete, syntactically valid SWIFT MT940 file:
{1:F01CITIUS33XXX0000000000}{2:I940CITIUS33XXXXN}{4:
:20:STMT20260331001
:25:US48CITI0001234567890
:28C:00045/001
:60F:C260301USD1450200,50
:61:2603050305CR250000,00NTRFNONREF//20260305001
:86:/EREF/INV-2026-881/REMI/GLOBAL TRADE SETTLEMENT/NAME/APEX CORP
:61:2603120312DR15000,00NTRFNONREF//20260312004
:86:/EREF/WIRE-OUT-094/REMI/CLOUD SERVER INFRASTRUCTURE
:61:2603240324DR450,00NCHKNONREF//CHK-001041
:86:CHECK PAID #1041
:62F:C260331USD1684750,50
-}
Mathematical Balance Integrity Verification
Every automated MT940 ingestion pipeline must enforce mathematical proofing before inserting ledger entries into an ERP:
$$\text{Opening Balance (:60F:)} + \sum \text{Credits (:61: C)} - \sum \text{Debits (:61: D)} = \text{Closing Balance (:62F:)}$$
In the canonical message above:
- Opening Balance:
$1,450,200.50 - Credit 1:
+$250,000.00 - Debit 1:
-$15,000.00 - Debit 2:
-$450.00 - Net Change:
+$234,550.00 - Closing Balance:
$1,450,200.50 + $234,550.00 = $1,684,750.50
Because the mathematical result perfectly equates to Field :62F:, the message passes integrity verification with zero reconciliation variance.
Converting MT940 to Clean Excel / CSV
While enterprise treasury software ingests MT940 files natively, accounting analysts and financial modelers frequently need to convert MT940 messages into structured Excel spreadsheets.
An automated parser maps the nested SWIFT syntax into standard tabular headers:
| Value Date | Transaction Code | Reference | Counterparty / Payee | Remittance Details | Debit | Credit | Running Balance |
|---|---|---|---|---|---|---|---|
| 2026-03-05 | NTRF | 20260305001 | APEX CORP | GLOBAL TRADE SETTLEMENT | 250000.00 | 1700200.50 | |
| 2026-03-12 | NTRF | 20260312004 | CLOUD SERVER | INFRASTRUCTURE BILLING | 15000.00 | 1685200.50 | |
| 2026-03-24 | NCHK | CHK-001041 | CHECK 1041 | CHECK PAID #1041 | 450.00 | 1684750.50 |
By executing automated decimal normalization (replacing European comma decimals with periods) and tokenizing Field :86: narratives, treasury departments achieve instantaneous reconciliation without manual file rekeying.
Detailed Grammar Analysis: Field :86: Structured Tokenization & Subfields
The single most challenging component of SWIFT MT940 parsing is Field :86: (Information to Account Owner). While SWIFT standards define the high-level tag boundaries, individual national banking associations and clearing networks implement specialized internal subfield delimiter conventions within Field :86:.
1. The European SEPA & German DTAUS Delimiter Standard (?xx)
In Germany, Austria, and across European SEPA clearing systems, Field :86: utilizes question mark delimiters (?xx) to separate transaction metadata:
:86:?00SEPA CREDIT TRANSFER?1012345?20EREF+INV-2026-881?21REMI+TRADE SETTLEMENT?30GENODED1TUT?31DE89370400440532013000?32APEX CORP GMBH
Structured Subfield Mapping:
?00: Booking Text / Transaction Type Key (e.g.,SEPA CREDIT TRANSFER).?10: Internal Bank Transaction Code.?20to?29: End-to-End Reference (EREF) and Remittance Information (REMI).?30: Counterparty Bank Identifier Code (BIC / SWIFT).?31: Counterparty International Bank Account Number (IBAN).?32and?33: Counterparty Business Name and Legal Entity Identifier.
An intelligent MT940 parser splits these question-mark tokens into individual dictionary elements, populating distinct Counterparty IBAN, Counterparty BIC, and Invoice Reference columns in your destination spreadsheet.
2. The International Swift Tag Delimiter Standard (/xxx/)
In Anglo-American and global corporate treasury feeds, Field :86: frequently utilizes forward slash delimiters (/xxx/):
:86:/EREF/INV-2026-881/REMI/GLOBAL TRADE SETTLEMENT/NAME/APEX CORP/IBAN/DE89370400440532013000
Standard Forward Slash Tokens:
/EREF/: End-to-End Creditor Reference (Crucial for automated invoice matching in accounts receivable)./REMI/: Free-format unstructured remittance memo./NAME/: Counterparty entity name./IBAN/: Counterparty bank account./MARC/: Merchant Category Code for corporate purchasing cards.
Complete Python Parsing Implementation for MT940 Messages
Software developers and treasury engineers can implement this streamlined Python parser to extract MT940 files into pandas DataFrames:
import re
import pandas as pd
def parse_mt940(file_content):
transactions = []
# Regular expression to extract :61: statement lines and corresponding :86: tags
pattern = re.compile(
r':61:(d{6})(d{4})?(CR|DR|C|D)([A-Z0-9,.]+)(N[A-Z]{3})([^
/]+)?(?://([^
]+))?
?
(?:(?::86:([^
]+(?:
?
(?!:)[^
]+)*))?)',
re.MULTILINE
)
for match in pattern.finditer(file_content):
val_date, entry_date, dc_mark, amount_str, trn_type, ref_cust, ref_bank, memo, _ = match.groups()
# Normalize European comma decimal to standard period
amount = float(amount_str.replace(',', '.'))
if 'D' in dc_mark:
amount = -amount
transactions.append({
'ValueDate': f"20{val_date[:2]}-{val_date[2:4]}-{val_date[4:6]}",
'Amount': amount,
'Indicator': 'Credit' if amount > 0 else 'Debit',
'TransactionType': trn_type,
'Reference': ref_cust or ref_bank or '',
'Description': memo.replace('\n', ' ').strip() if memo else ''
})
return pd.DataFrame(transactions)
Transitioning from MT940 to ISO 20022 (camt.053)
The global financial services industry is in the final stages of a multi-year migration from legacy SWIFT MT messaging to modern ISO 20022 XML standards (specifically the camt.053 Customer Bank Statement format).
- Why MT940 Still Dominates: While central clearing networks support ISO 20022, millions of enterprise ERP installations lack native camt.053 ingestion engines.
- Compatibility Bridge: Modern data extraction platforms automatically convert MT940 flat files into clean Excel schedules, ensuring continuity during corporate treasury modernization programs.
Enterprise ERP Integration Guide: Ingesting MT940 into SAP, NetSuite & Dynamics
While raw MT940 files are easily converted into Excel spreadsheets for financial analysts, enterprise resource planning (ERP) suites ingest MT940 statements directly through automated batch processors. Below is the technical configuration blueprint for major enterprise platforms:
1. SAP S/4HANA Electronic Bank Statement (EBS) Configuration
In SAP, the MT940 format is processed via transaction code FF_5 (Electronic Bank Statement Execution) or the modern Fiori app Manage Incoming Bank Statements:
- Electronic Bank Statement Format: Select format code
S(SWIFT MT940 with field :86: structured). - Posting Parameters: Configure posting type
4(Post to subledger and general ledger simultaneously) or posting type1(Post to GL only). - Search String Configuration: Use transaction code
OT55to establish automated search string rules that inspect Field :86: for customer invoice numbers, extracting the billing document ID and executing automated open-item clearing.
2. Oracle NetSuite Bank Feeds SuiteApp & Financial Feeds
NetSuite utilizes the Bank Statement Parsers SuiteApp to process MT940 statements:
- Navigate to Setup > Accounting > Financial Statements > Bank Statement Parsers.
- Select the SWIFT MT940 Parser Plug-in.
- Map the
:25:account identifier string directly to the corresponding NetSuite GL Bank Account entity. - Configure auto-matching tolerance rules (e.g., matching transactions within a ±3 day window and zero dollar variance).
3. Microsoft Dynamics 365 Finance & Operations (D365)
In Dynamics 365, MT940 files are ingested via the Electronic Reporting (ER) framework:
- Import the standard Microsoft-provided ER format:
MT940 - Swift statement model. - Map Field :61: transaction codes (
NTRF,NCHK,NCOL) to D365 Bank Transaction Types. - Establish automated settlement rules that reconcile customer payments directly against open customer accounts receivable journals.
Technical Appendix: Comprehensive Tag Reference Table & Character Set Specifications
To assist systems architects and software developers building production-ready MT940 interfaces, below is the complete character set and technical formatting specification:
SWIFT Character Set X Standards
All text fields within an MT940 message are strictly constrained to SWIFT Character Set X, which comprises:
- Uppercase and lowercase alphabetic characters:
AthroughZ,athroughz. - Numeric digits:
0through9. - Permitted special punctuation characters:
/(slash),-(hyphen),:(colon),((open parenthesis),)(close parenthesis),.(period),,(comma),'(apostrophe),+(plus sign), and space. - Critical Technical Constraint: Characters such as ampersands (
&), exclamation marks (!), question marks (outside designated subfield delimiters), and currency symbols ($,€) are strictly prohibited in standard MT940 syntax. Financial institutions must substitute or omit these symbols when compiling the message stream.
Maximum Field Length Specifications
- Tag :20: (TRN): Exactly 16 characters maximum.
- Tag :25: (Account ID): Up to 35 characters.
- Tag :28C: (Statement/Sequence): 5 numeric characters for statement number, followed by an optional slash and up to 5 characters for sequence number (e.g.,
00012/001). - Tag :61: (Statement Line): Variable length, maximum 100 characters per line.
- Tag :86: (Information to Account Owner): Up to 6 physical lines of 65 characters each, totaling 390 characters maximum.
By enforcing strict character set validation and field length checks prior to transmission, financial institutions ensure that electronic bank statements traverse global corporate networks without parsing exceptions.
By following these rigorous extraction, validation, and reconciliation principles, finance teams can confidently eliminate manual data entry, streamline monthly account closes, and maintain audit-proof general ledgers across all accounting platforms.



