IBAN check digit errors detected by mod 97 include every single-digit substitution and every swap of two digits we tested, plus all but 0.9% of double substitutions. It cannot detect a wrong but valid account, a wrong bank, or an account that does not exist, so a name match and bank-code check still matter.
The two check digits in an IBAN, characters three and four, are a typo detector, and a good one for the mistakes people make most often. They are not a verification that the account exists or belongs to the person you mean to pay. This article measures what the mod 97 test catches on a real registry example, explains the cases it cannot catch by design, and lists what a payer or payment system should check in addition.
The check is the one defined in ISO/IEC 7064 (MOD97-10), which the SWIFT IBAN Registry names as the basis of the check digits. The registry release read for this article is number 103, dated September 2026.
The check in one paragraph
To validate, an IBAN is rearranged (first four characters moved to the end), letters become numbers (A = 10 to Z = 35), and the resulting integer is divided by 97. A remainder of 1 means the number is internally consistent. Because the integer is too long for many spreadsheet and programming types, implementations carry the remainder forward in pieces. Every IBAN also has a fixed length and structure per country in the registry, which is a separate and earlier test than the remainder.
One worked check as evidence
For the registry’s German example, DE89 3704 0044 0532 0130 00, moving DE89 to the end and converting D = 13, E = 14 gives 370400440532013000131489. Dividing in pieces gives remainders 23, 70, 38 and finally 1, so it passes. The German structure, per the Bundesbank, is an eight-digit bank sort code followed by a ten-digit account number, and that sort code is what several of the failure cases below turn on.
| Country | Registry structure | Length | Registry example |
|---|---|---|---|
| Germany | DE 2 digits, 8 digits, 10 digits | 22 | DE89370400440532013000 |
| United Kingdom | GB 2 digits, 4 letters, 6 digits, 8 digits | 22 | GB29NWBK60161331926819 |
| France | FR 2 digits, 5 digits, 5 digits, 11 alphanumeric, 2 digits | 27 | FR1420041010050500013M02606 |
| Spain | ES 2 digits, then 20 digits | 24 | ES9121000418450200051332 |
| Netherlands | NL 2 digits, 4 letters, 10 digits | 18 | NL91ABNA0417164300 |
I ran the calculation in a script and got a remainder of 1 for each of the five registry examples above.
What mod 97 catches, measured
I took the German example, kept the country code, changed it every way a typist might, and counted how many altered numbers still passed.
| Mistake tried on DE89 3704 0044 0532 0130 00 | Cases | Still passed |
|---|---|---|
| One digit replaced by a different digit | 180 | 0 |
| Two neighbouring digits swapped (adjacent transposition) | 15 | 0 |
| Any two different digits swapped | 156 | 0 |
| Two digits both replaced (every pair of positions) | 15,390 | 141 (0.9%) |
Two results matter in practice. A single wrong digit is always caught, and so is a swap of two different digits, including neighbours, which are the two commonest keying slips. Double substitutions are where the arithmetic starts to leak: 141 of 15,390 still pass. One of them is DE59 7704 0044 0532 0130 00, which differs from the original in two places, leaves a remainder of 1, and points at a different sort code. The roughly one-in-97 leak rate is what the remainder arithmetic would predict for random double errors. These counts are for this one IBAN and my own script, not a figure from a standard.
What it cannot catch, by design
The check digits are a two-digit code derived from the other characters, so anything that produces another self-consistent number passes:
- A wrong but valid account. If the payer types a different, real IBAN with correct check digits (an old account, a colleague’s, a similar-looking one), the arithmetic is satisfied. Nothing in the number says whose it is.
- A wrong bank. A sort code or bank identifier that is well formed but not the intended one passes as long as the check digits were computed for it. This includes the double-substitution case above.
- A typo of the right length that still validates. The roughly 0.9% of double errors in the table are exactly this: the right length, the right character types, and a remainder of 1.
- An account that does not exist or is closed. A number can be consistent and never have been issued.
- Country-specific rules. The Bundesbank explains that each German sort code carries an IBAN rule describing how that institution builds the account part, so a full check of a German IBAN needs national data as well as mod 97.
What to do beyond the check digit
Treat the mod 97 test as the cheap first filter and add independent checks that test the things it cannot:
- Length and structure first. Reject the wrong length or wrong character types for the country using the registry before computing anything.
- Bank code or BIC validation. Look the sort code or bank identifier up against the national or registry data, so a well-formed but unknown or unintended bank is flagged. A BIC identifies the bank, the IBAN identifies the account; the check digits test neither.
- Name match, or confirmation of payee. This is the only control in the list that tests whether the account holder is who you meant. It is the payee name check that euro-area banks run before you confirm a transfer, described in our guide to SEPA instant payments. The same IBAN is used for a SEPA direct debit mandate, so a biller collecting a debtor’s IBAN has the same blind spot and should not treat a valid result as proof of ownership.
- Sanity checks. Compare the country with the customer’s profile, flag an IBAN that differs from the one used before, and for a first payment to a new payee confirm the details with the recipient through a channel you already trust.
In practice, an online IBAN validator is a typo filter. If it says invalid, there is a typing mistake or the wrong length for the country. If it says valid, the next safeguard is the name match your bank shows.





