IBAN validator and check digit calculator
Check an IBAN against the SWIFT registry: length, character types, mod 97 check digits and its bank and branch parts. Or calculate check digits for a BBAN.
A clear answer. Here’s how.
Checks an IBAN in the order that makes a failure easiest to explain: the characters (spaces and hyphens are ignored, letters are upper-cased); the country code and the two check digits; whether the country is in the SWIFT IBAN Registry (release 103, text file modified 17 September 2026, 89 countries); the length that country requires; the character type of each part of its BBAN (n is digits, a is upper-case letters, c is letters and digits); and the ISO 7064 mod 97-10 check, in which the first four characters move to the end, each letter becomes 10 to 35, and the resulting number must leave remainder 1 when divided by 97. The remainder is worked out digit by digit with whole numbers, so nothing is rounded. The first failed check is reported, with every check that could run. The registry text file names only the bank identifier and the branch identifier of each country, so those two are shown as such and the rest of the BBAN (the account number and any national check digits) is shown as runs of the allowed characters. Create an IBAN gives the check digits as 98 minus the remainder of BBAN, country code and 00 divided by 97, and prints the IBAN in groups of four; a calculated IBAN is only well formed. The mod 97 check catches every change of one digit to another digit or of one letter to another letter, and every swap of two neighbouring digits or of two neighbouring letters. It can miss a swap of a letter and a digit (always for B and 1, M and 2, or X and 3, and now and then where the check digits meet the account part) and a letter replaced by a digit or the reverse, because a letter counts as two digits. This tool does not verify national check digits (Spanish, French, Italian, Belgian, Portuguese and others), does not look up banks, BICs or account holders, and cannot say that an account exists. Some countries use IBAN-style numbers that the registry does not list.
How this is checked
5 reference checks passed These 5 cases were run when this page was built, on 20 October 2026, and all reproduce within the stated tolerance. The same cases are part of the automated tests that run on every change to Toolmoz. Engine version 1.
See the checks and where each expected answer comes from
Case 1
- Inputs
- What to do validateIBAN GB29 NWBK 6016 1331 9268 19
- Expected, and what Toolmoz gave
- Result expected Valid, Toolmoz ValidCheck digits expected 29, Toolmoz 29Length expected 22, Toolmoz 22Mod 97 remainder expected 1, Toolmoz 1Bank identifier expected NWBK, Toolmoz NWBKBranch identifier expected 601613, Toolmoz 601613
- Where the expected answer comes from
- SWIFT IBAN Registry release 103, United Kingdom: example GB29NWBK60161331926819, 22 characters, bank identifier at BBAN positions 1-4 and branch identifier at 5-10. Arithmetic in CPython 3.13: the rearranged text NWBK60161331926819GB29 reads as 2332112060161331926819161129 (N=23, W=32, B=11, K=20, G=16), and that integer % 97 is 1
- Allowed difference
- exact
Case 2
- Inputs
- What to do validateIBAN GB82 WEST 1234 5698 7654 32
- Expected, and what Toolmoz gave
- Result expected Valid, Toolmoz ValidMod 97 remainder expected 1, Toolmoz 1
- Where the expected answer comes from
- Wikipedia, International Bank Account Number, validation example: GB82 WEST 1234 5698 7654 32 is rearranged to 3214282912345698765432161182, and that number mod 97 is 1
- Allowed difference
- exact
Case 3
- Inputs
- What to do validateIBAN GB29 NWBK 6016 1331 9268 18
- Expected, and what Toolmoz gave
- Result expected Invalid, Toolmoz InvalidFirst failed check expected Check digits (mod 97), Toolmoz Check digits (mod 97)Mod 97 remainder expected 71, Toolmoz 71
- Where the expected answer comes from
- The registry example with its last digit changed from 9 to 8. That digit sits before the six digits of GB29 (1611 and 29) in the rearranged number, so the number drops by 10^6. 10^2 is 3 mod 97, so 10^6 is 3^3 = 27, and the remainder becomes (1 - 27) mod 97 = 71
- Allowed difference
- exact
Case 4
- Inputs
- What to do validateIBAN GB29 NWBK 6016 1331 9268 1
- Expected, and what Toolmoz gave
- Result expected Invalid, Toolmoz InvalidFirst failed check expected Length for the country, Toolmoz Length for the countryLength expected 21, Toolmoz 21Expected length expected 22, Toolmoz 22
- Where the expected answer comes from
- SWIFT IBAN Registry release 103: a United Kingdom IBAN has 22 characters (BBAN structure 4!a6!n8!n is 18 characters, plus 4); the input has 21
- Allowed difference
- exact
Case 5
- Inputs
- What to do createCountry DEBBAN (the account part after the country code and check digits) 370400440532013000
- Expected, and what Toolmoz gave
- IBAN (electronic format) expected DE89370400440532013000, Toolmoz DE89370400440532013000Check digits expected 89, Toolmoz 89
- Where the expected answer comes from
- SWIFT IBAN Registry release 103, Germany: example DE89370400440532013000. CPython 3.13: the BBAN followed by DE00 reads as 370400440532013000131400 (D=13, E=14), which is 9 mod 97, and 98 - 9 = 89
- Allowed difference
- exact
What this shows: the engine reproduces independently worked values for these cases. It does not prove every possible input is right. To test an answer you were given, see how to check a number; to see what is and is not checked across Toolmoz, see the accuracy ledger.