top of page

SWIFT Message Parsing: How to Extract Reliable Data

2 minutes ago
8 min read

Sketch-framed title card for SWIFT parsing

SWIFT message parsing means turning a raw payment or statement message into clean, validated fields that your systems can reconcile, screen and audit. A reliable parser reads the block structure, keeps every repeated field, validates against the message schema and handles both legacy MT and ISO 20022 MX formats. Getting this right is an engineering and operating problem, not a one-off script, which is why we recommend one accountable team owns design, build and operation.



TL;DR

 

  • An MT message has five blocks; the payment content sits in block 4 as tagged fields, and a parser must respect its delimiters.

  • Preserve raw text and every repeated field, such as the :61: lines in an MT940 statement, before you interpret anything.

  • Validate in two layers: schema checks for format, length and character set, then business rules across fields.

  • In Malaysia, RENTAS payment messages moved to MX on 7 July 2024, while securities messages remain MT, so most institutions need to handle both.

  • Parsing that survives production needs testing, monitoring and an owner after go-live.

 

Table of Contents

 

 

What a SWIFT MT message looks like to a parser

 

A SWIFT MT message is plain ASCII text. According to TIBCO’s SWIFT documentation, it generally has up to five blocks: a basic header {1:}, an application header {2:}, an optional user header {3:}, the text block {4:} with tagged fields, and a trailer {5:}.

 

The headers tell you who sent the message, who receives it and what type it is. The text block carries the business content. Fields inside it are identified by tags such as :20: for the sender’s reference, and the same documentation notes that the delimiters between them are mandatory line breaks. A parser that splits on the wrong character, or trims whitespace carelessly, will silently corrupt data.


Five blocks in a SWIFT MT message

This is also where many home-built parsers first fail. A common symptom is a file that holds several messages, where the first block is read correctly and the second is not. The cause is usually an assumption of one message per file, with no logic for the boundaries between messages.

 

The message types your teams will meet

 

Most finance and operations teams deal with a small set of types:

 

Message

Typical use

Parsing point

MT103

Single customer credit transfer

Remittance text in field 70

MT202

Transfer between financial institutions

Often paired with a customer message

MT940 / MT941

Statement and balance reporting

Repeating transaction lines

The Austraclear SWIFT messaging document, written for an Australian settlement service, describes MT103 as a single-customer credit transfer. Usage rules differ by bank and payment corridor, so treat any single guide as an example of a pattern and not as a Malaysian rule.

 

Field 70 and the free-text problem

 

Field 70 is where parsing meets the real world. In the MT103 guide above, it is optional remittance information in a 4*35x format: up to four lines of 35 characters. It can hold transaction details or a reference to another message, and the guide lists codewords such as /INV/, /IPI/, /RFB/ and /ROC/.

 

Three habits keep this field useful:

 

  1. Store the raw text with its line boundaries before any interpretation. A reference split across two lines is still one reference.

  2. Apply codeword rules only where the relevant bank or corridor specifies them. The same business information may sit elsewhere in another context: SWIFT’s CNY guidelines place structured business codes in field 72 for MT103 and MT202, kept on one line.

  3. Treat unmatched text as data, not as an error. Invoice numbers typed by hand rarely follow a pattern.

 

Free text is also where document processing and parsing meet. Matching a remittance line to an invoice, a purchase order or a trade document is a classification and extraction task, and it is where language models can add value on top of a deterministic parser, provided their output is structured and validated. We cover the technique in our guide to structured output from LLMs.

 

Extraction that does not lose data

 

The most expensive parsing errors are quiet ones. The BMC documentation on SWIFT message formats notes that MT940 statements can repeat :61: transaction fields. A parser that stores a tag in a dictionary keyed by tag name keeps only the last occurrence, and a statement with 400 transactions becomes one.

 

Design the data model around ordered lists of fields, not single values. Then add typed access on top. Open-source libraries such as Prowide Core show the pattern: raw FIN content is parsed into typed Java objects, and field components such as dates, currency, amount and BIC data are accessible individually.

 

A practical extraction pipeline has four stages:

 

  1. Split the input into individual messages and blocks.

  2. Parse the text block into ordered tagged fields, keeping the raw string.

  3. Convert into typed values: dates, decimal amounts with the correct comma convention, currency codes.

  4. Validate, route and log.

 

Validating: schema first, business rules second

 

Microsoft’s documentation for its SWIFT accelerator explains how SWIFT schemas work. Schemas define each message type’s blocks, fields and subfields. Schema validation checks format, character set, value set, range, whether a field is mandatory or optional, repeatability, position and length. Business rules then perform cross-field and logical checks.

 

Keep these layers separate in your own design. A schema failure means the message is malformed and should be rejected or repaired at the source. A business-rule failure means the message is well formed but inconsistent, such as an amount and currency that do not match the expected account, and it belongs in an exception queue with a human owner. Mixing the two produces error lists nobody can act on.


Separate routes for schema and business-rule failures

MT and MX: what changed in Malaysia

 

The other half of the problem is ISO 20022, the newer XML-based standard. SWIFT describes the methodology as moving from a business model and dictionary to logical messages and then their physical syntax. Its CBPR+ usage guidelines define how ISO 20022 messages are used for cross-border payments and cash reporting on its network and how they are validated.

 

For Malaysian institutions, the local fact matters. Bank Negara Malaysia’s RENTAS operational procedures state that payment messages use ISO 20022 formats and that participants moved to MX from 7 July 2024, while securities messages retain ISO 15022 and MT formats. A single institution therefore runs two parsing worlds side by side.

 

Outside RENTAS, corridor and provider guidance varies. A March 2025 FAQ from BNP Paribas says there is no specific deadline for corporate migration and that unstructured addresses are accepted until November 2026, with structured or hybrid formats as alternatives. Standard Chartered’s corporate migration guide lists November 2025 as the end of CBPR+ coexistence and cautions that timelines may change. Check your own banks for the schedule that applies to you.

 

The practical consequence for parsing: addresses are the field to watch. MT carried an address as free lines; MX expects structure, so a parser needs to split town, postcode and country reliably or pass structured data through intact. Some banks also offer temporary conversion of MT to MX. The May 2026 BNY FAQ describes this as chargeable and temporary for its own clients, so do not build a long-term design around conversion by someone else.

 

The validation discipline is the same in both worlds. Guidance on validating cross-border message requirements in document-heavy workflows shows how extraction and validation need to be designed together, a principle that applies equally to CBPR+ checks.

 

Testing before go-live

 

German banking practice offers a useful model. The Deutsche Bundesbank’s testing framework recommends test data or anonymised real data and bidirectional test exchanges under the applicable ISO message rules. It applies to German payment services, not RENTAS, but the habits transfer.

 

Build a regression set from real message shapes: multi-message files, MT940 with many :61: lines, field 70 with and without codewords, long names that wrap, and unusual characters. Run it on every change. Anonymise before it leaves production, and keep audit evidence of what each test covered.

 

Where AI helps, and where it should not

 

Deterministic parsing handles anything with a defined syntax. Use machine learning and language models for the parts without one: free-text remittance lines, attached invoices, trade documents and correspondence that arrive alongside the message. The result must then pass through the same schema and business-rule checks as everything else, with a confidence threshold and a review queue.

 

Once live, accuracy drifts as senders change habits and formats evolve. Our guides to ML model validation and model monitoring strategy set out how to measure that drift and respond.

 

  Most parsing projects are scoped as a build and then handed to an operations team that never saw the design. The first change in message format, such as the MT to MX shift, lands on people who do not know why the parser works as it does.   We take the opposite approach. One senior team owns strategy, build and operation, so the person who decides which fields matter is the one who answers when an exception queue grows. We engineer for production from the start, with governance, auditability and measured business results in view.   For banks, insurers, manufacturers and logistics firms, that means parsing that stays accurate as standards evolve, with audit trails that compliance can read.   Thomas Samuel

Our view

 

Making the parser a managed capability

 

If your team is weighing a rebuild, begin with readiness: which message types you receive, from whom, in which format, and what happens to each field downstream. Our Readiness & Data Diligence service covers that assessment, and our AI & GenAI Solutions cover building document-processing and conversational systems, including deployment, monitoring and managed operations.


Sentient Concepts

To discuss parsing, document processing or ISO 20022 readiness for your institution, see our services and get in touch.

 

FAQ

 

What is the difference between parsing MT and MX messages?

 

MT messages are ASCII text with tagged fields inside numbered blocks. MX messages follow ISO 20022 and carry richer, structured data. Parsing MT means respecting delimiters and tags; MX parsing relies on a defined message schema and structured elements such as addresses.

 

What does field 70 contain?

 

In an MT103 it is optional remittance information of up to four lines of 35 characters. It can hold payment details or a reference to another message, sometimes with codewords such as /INV/ or /RFB/. Keep the raw text and apply codeword logic only where your bank specifies it.

 

Does Malaysia still use MT messages?

 

Yes, in part. BNM’s RENTAS procedures state that payment messages moved to MX on 7 July 2024, while securities messages keep MT formats. Cross-border flows depend on your correspondent banks and their migration schedules.

 

Why do parsers lose transactions in statements?

 

Statement messages such as MT940 can repeat the :61: field. If a parser stores one value per tag, only the last survives. Store fields as an ordered list.

 

Sources

 

Recommended

 

 
 
bottom of page