# IBAN explained: how the mod-97 check catches typos and what each part means

> An IBAN looks like a random string, but every character has a job. This guide breaks one apart, walks through the mod-97 check by hand, shows how many typing mistakes it catches and explains why a valid IBAN is not the same as a real, working account.

Published 2026-10-09 by Toolcloak. 3 minute read. Original: https://toolcloak.pages.dev/articles/iban-explained-how-the-mod-97-check-catches-typos-and-what-each-part-means
Related free tool: [IBAN Validator](https://toolcloak.pages.dev/tools/iban-validator)

The **International Bank Account Number (IBAN)** is a standard way to write a bank account so payments can cross borders with fewer errors. Most of Europe, the Middle East and parts of Africa, Asia and South America use it. India does not; Indian transfers use an account number plus an IFSC code.

> **In short**
> - An IBAN has three parts: a **2-letter country code**, **2 check digits** and a country-specific **BBAN** (the domestic account details).
> - Length depends on the country: 15 to 34 characters. Germany is 22, France 27, Norway 15.
> - The **mod-97 check** catches every single-character typo and swapped neighbours in the examples we tested.
> - A valid IBAN only means the characters are consistent. It does not prove the account exists or belongs to the person you think.

## Taking an IBAN apart

The standard example from the specification is **GB82 WEST 1234 5698 7654 32**. Spaces are added only to make it easier to read. In the machine form there are none: GB82WEST12345698765432.

**GB82WEST12345698765432, piece by piece**

1. **GB.** Country code (United Kingdom), two letters from ISO 3166.
2. **82.** Two check digits, calculated from the rest of the IBAN.
3. **WEST.** Bank code (here, four letters identifying the bank).
4. **123456.** Sort code: identifies the branch.
5. **98765432.** The account number itself.

*The last three pieces together are the BBAN, the Basic Bank Account Number. Its layout differs from country to country.*

Try it: [IBAN Validator](https://toolcloak.pages.dev/tools/iban-validator). Paste an IBAN to check its length, format and check digits.

## Lengths by country

Each country fixes one total length. A string of the wrong length cannot be a valid IBAN for that country, which is the first thing a validator checks.

**IBAN length in characters, selected countries**

|  | Value |
| --- | --- |
| NO | 15 |
| BE | 16 |
| NL | 18 |
| DE | 22 |
| GB | 22 |
| ES | 24 |
| FR | 27 |
| MT | 31 |

*Norway has the shortest at 15 and Malta one of the longest at 31. The UAE is 23 and Saudi Arabia 24.*

## The mod-97 check, step by step

The check digits come from a calculation that anyone can repeat. A validator moves the first four characters to the end, turns letters into numbers, and takes the remainder when divided by 97. A valid IBAN always leaves **1**.

**Checking GB82WEST12345698765432**

1. **Move the first four characters to the end.** GB82 goes last: WEST12345698765432GB82
2. **Turn letters into numbers.** A = 10, B = 11 … Z = 35. W=32, E=14, S=28, T=29, G=16, B=11.
3. **Build one long number.** 3214282912345698765432161182
4. **Divide by 97 and keep the remainder.** The remainder is 1, so the IBAN passes.

*The number is too long for ordinary calculators, so software divides it in chunks. The remainder is the same.*

| Step | Working | Result |
| --- | --- | --- |
| Put 00 in place of the check digits | WEST12345698765432GB00 | Number ends in ...1100 |
| Take that number mod 97 | 3214282912345698765432161100 ÷ 97 | Remainder 16 |
| Subtract from 98 | 98 − 16 | Check digits **82** |

*This is how check digits are created: the same method in reverse. Anyone can repeat it, which is why a validator needs no database.*

## What mistakes does it catch?

We tested the example IBAN. Changing any one of its 16 digits to any other digit gives a failing check in all 144 cases. Swapping each of the 14 pairs of different neighbouring digits also fails every time. Real-world mistakes, such as typing one wrong digit or swapping two, are therefore caught almost every time.

**Our test of the example IBAN**

|  | Value | Note |
| --- | --- | --- |
| Single digit changed | 144 of 144 | All detected |
| Neighbouring digits swapped | 14 of 14 | All detected |
| Chance a random string passes | 1 in 97 | About 1.03% |
| Random strings caught | 98.97% | By this check alone |

*The 1-in-97 figure is for random strings. Real typing errors are caught far more reliably than that.*

**Out of 97 random strings of the right length, how many pass?**

| Group | Count |
| --- | --- |
| Fail the check | 96 |
| Pass by luck | 1 |

*Mod 97 leaves one of 97 possible remainders, so about one random string in 97 happens to leave 1.*

## Valid does not mean real

**What a validator can and cannot tell you**

| It can confirm | It cannot confirm |
| --- | --- |
| The format | The account |
| Country code exists and length is right | That the account is open |
| Characters are allowed for that country | That it belongs to the right person |
| Check digits are consistent | That the bank accepts payments there |

*Before a large first payment, confirm the details with the payee through a second channel, such as a phone call to a known number.*

> **Watch for payment fraud:** A common scam changes the IBAN on an invoice by email. The new IBAN will pass every format check. Always verify a changed bank detail by calling the supplier on a number you already trust.

## Writing and typing IBANs well

1. **Group in fours** when writing by hand or on paper: GB82 WEST 1234 5698 7654 32.
2. **Remove spaces and dashes** before pasting into a system.
3. **Use capital letters.** Lowercase is usually accepted but capitals are standard.
4. **Copy and paste** rather than retyping when you can.
5. **Check the first two letters.** They should match the country of the account.

## Frequently asked questions

### What is an IBAN?

An International Bank Account Number is a standardised way to write a bank account number. It starts with a two-letter country code and two check digits, followed by the country's domestic bank and account details.

### How long is an IBAN?

It depends on the country and ranges from 15 to 34 characters. Germany and the United Kingdom use 22, France 27 and Norway 15.

### How does the IBAN check digit work?

The first four characters are moved to the end, letters become numbers (A = 10 to Z = 35), and the resulting number is divided by 97. A valid IBAN leaves a remainder of 1.

### Does a valid IBAN mean the account exists?

No. Validation only proves the format and check digits are consistent. The account could be closed, wrong or fraudulent.

### Does India use IBAN?

No. Indian domestic transfers use an account number and an IFSC code. For international transfers the receiving bank may ask for an account number and a SWIFT/BIC code.

### Are spaces part of an IBAN?

No. Spaces are added only for readability, usually in groups of four. Remove them when entering an IBAN into a form.

