IBAN Validator: How the Mod 97 Check Works, Step by Step
By FindMySum · Last reviewed
An IBAN validator checks an International Bank Account Number before you send money to it: that the country uses IBANs, that the number has the right length and layout for that country, and that its two check digits pass the mod 97 test defined in ISO 13616. A typing mistake almost always fails that test, so a quick check can stop a payment going astray. This page runs the check in your browser and never puts the IBAN in the page address or sends it anywhere. The worked example uses the UK example IBAN from the SWIFT IBAN Registry, GB29 NWBK 6016 1331 9268 19.
What an IBAN is made of
| Part | Example | Meaning |
|---|---|---|
| Country code | GB | ISO 3166 two-letter code |
| Check digits | 29 | Two digits from the mod 97 calculation |
| BBAN | NWBK 6016 1331 9268 19 | The domestic account number: bank code, sort code, account |
Each country registers its BBAN format with SWIFT, the registration authority for ISO 13616. The registry fixes the length (22 characters for Germany and the UK, 27 for France, 15 for Norway, up to 34 elsewhere) and which positions hold digits, letters or either.
The three checks
- Country: the first two letters must belong to a country in the registry. The United States, Canada, Australia and India do not use IBANs.
- Length and format: the IBAN must have exactly the registered length, and the BBAN must match the country's pattern, written in ISO 13616 notation such as 4!a6!n8!n (four letters, six digits, eight digits).
- Check digits: the mod 97 test below.
Worked example: the mod 97 test
Take GB29NWBK60161331926819.
- Move the first four characters to the end: NWBK60161331926819GB29.
- Replace each letter with two digits, A = 10, B = 11 and so on to Z = 35. N = 23, W = 32, B = 11, K = 20 and G = 16, so the string becomes 2332112060161331926819161129.
- Divide that number by 97. The remainder must be 1.
A 28-digit number is too big for a pocket calculator, so ISO 13616 shows how to do it in pieces: take the first nine digits, find the remainder after dividing by 97, write that remainder in front of the next seven digits, and repeat until the digits run out. The breakdown table under the calculator shows each piece. For the example the final remainder is 1, so the IBAN passes.
Calculating check digits
To make the check digits for a new IBAN, the same rearrangement is used with 00 in place of the check digits: BBAN, then country code, then 00. The check digits are 98 minus the remainder. For the German example account 370400440532013000 the remainder is 9, so the check digits are 89 and the IBAN is DE89 3704 0044 0532 0130 00. Choose "calculate the check digits" on the calculator and type the country code followed by the account number.
What the check catches, and what it doesn't
The mod 97 method (ISO/IEC 7064 MOD 97-10) catches every single wrong character and nearly every swap of two characters, which covers most typing mistakes. It cannot tell you whether the account is open or whose it is. Many countries also embed national check digits in the BBAN, such as the French RIB key, which this page does not test. Banks in the euro area now offer a "verification of payee" check that compares the name with the IBAN before a transfer, and that is the check that catches a right number for the wrong person.
Privacy
An IBAN identifies a bank account, so this page treats it as personal data: it stays in your browser, is left out of share links and saved scenarios, and the site's calculation API refuses it in a web address. Only the choice between validating and calculating check digits is kept in the link.
The same idea of a check digit protects card numbers (Luhn calculator), product barcodes (GTIN check digit calculator) and book numbers (ISBN converter), each with its own arithmetic.
More questions
How do I write an IBAN on an invoice?
In print format: the country code and check digits, then the rest in groups of four separated by spaces, such as GB29 NWBK 6016 1331 9268 19. Online forms usually want the electronic format with no spaces; both are the same IBAN.
Can two different accounts have IBANs that differ only in the check digits?
No. The check digits are calculated from the country code and the account number, so one account number gives exactly one pair of check digits. Two IBANs that differ only in those two digits mean one of them is mistyped.
Do I need an IBAN to receive money from Europe into Canada?
No. Canada does not use IBANs. The sender's bank needs your account number, the bank and branch (transit) numbers, and your bank's SWIFT/BIC code, and some banks ask for an intermediary bank as well.
Why do some IBANs contain letters?
The account part (BBAN) follows each country's own format. The UK puts a four-letter bank code first, and countries such as France, Italy and Malta allow letters inside the account number. The IBAN Registry spells out where letters are allowed.
Can I calculate an IBAN from my old account number?
Only if you know your country's exact BBAN layout, including bank and branch codes and any national check digits. Your bank shows the official IBAN in online banking and on statements, and that is the one to use.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.