Error messages / MT940 file validator
This does not look like an MT940 file
What the validator shows
This is the finding for the sample file mt940-error-not-mt940.txt:
- ErrorThis does not look like an MT940 file
- Found
- Kontoauszug Oktober
Spaces are shown as dots so that they can be counted.
A message of the MT940 file validator, reported as an error. An MT940 statement is built from fields that start with a tag such as :20: or :60F:. What the validator looks for and what usually goes wrong.
What the validator looks for
An MT940 statement is plain text. Each field begins on a new line with its tag between two colons: :20: for the reference, :25: for the account, :28C: for the statement number, :60F: for the opening balance, :61: for an entry. The validator reports this message when none of the lines of the file starts with one of those five tags.
What it usually means
- The file is another format. A CAMT.053 file is XML and starts with
<; the validator says so when it sees that. Use the CAMT.053 validator for it. - The file is a PDF or a spreadsheet that was renamed, or a text export from a program that does not write MT940.
- The tags are indented, or each line begins with extra characters, so no line starts with a colon.
- The file is a note, a log or an error page that the bank's website saved under the name of a statement.
How to fix it
Open the file in a text editor. A real MT940 file shows lines like :20: and :61:, one field per line. If it shows something else, download the statement again from the bank and choose the MT940 or SWIFT format. This tool does not change files.
The sample file for this page holds one sentence and no field at all.
Source: SWIFT, Category 9 Message Reference Guide (MT 940), and Die Deutsche Kreditwirtschaft, DFU Agreement Appendix 3 V3.8, chapter 8.
Check your own file
Drop your file into the MT940 file validator. It reports problems and does not change the file.
Other MT940 file messages
- A mandatory field of the statement is missing or empty
- Fields are not in the order the MT940 format lists them
- A field 86 does not follow a field 61
- A field tag is not one the MT940 format lists
- A character is used that the SWIFT character set does not include
- A reference starts or ends with a slash, or has two slashes in a row
- Field 28C is not a statement number of up to 5 digits, optionally followed by / and a sequence number
- A balance date is not a valid date (YYMMDD)
- An amount is not digits with a decimal comma
- The debit/credit mark of a statement line is not C, D, RC or RD
- The transaction type of a statement line is not S, N or F
- An opening balance differs from the closing balance of the previous message of the account
- In this file the opening balance plus the entries does not equal the closing balance