An IBAN’s length is fixed per country, from 15 characters in Norway up to 31 in Malta. This tool gives the official length and structure for each IBAN-participating country and validates any IBAN you paste against both its length and the MOD-97 check digits.
How it works
Every IBAN starts with the same four characters:
D E 8 9 3 7 0 4 0 0 4 4 0 5 3 2 0 1 3 0 0 0
^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ctry chk BBAN (country-specific)
- Characters 1-2 — country code: ISO 3166-1 alpha-2.
- Characters 3-4 — check digits: computed with MOD-97.
- Remaining — BBAN: the national account number, whose length and layout the country defines.
To validate the check digits, move the first four characters to the end,
replace each letter with two digits (A=10 … Z=35), and take the whole number
modulo 97. A correct IBAN yields a remainder of exactly 1.
Why IBAN length varies so widely
The variation in length comes entirely from the BBAN — the domestic account number each country had before IBAN was adopted. Some countries had compact national account formats (Norway’s is just 11 digits), while others had elaborate routing structures that needed many more characters to encode bank, branch, and account fields.
For example, Malta’s 31-character IBAN must fit a 4-letter bank code, a 5-digit sort code, and an 18-character account — a legacy of Malta’s banking structure. Norway’s 15-character IBAN encodes an 11-digit domestic account number with no separate bank or branch fields at all. Each country froze its existing domestic format inside the IBAN wrapper.
IBAN lengths for common corridors
| Country | Code | Length | BBAN structure |
|---|---|---|---|
| Norway | NO | 15 | 11-digit account |
| Belgium | BE | 16 | 3-digit bank + 7 digits + 2 check |
| Netherlands | NL | 18 | 4-letter bank + 10 digits |
| Finland | FI | 18 | 3-digit bank group + 11 digits |
| Germany | DE | 22 | 8-digit BLZ + 10-digit Kontonummer |
| United Kingdom | GB | 22 | 4-letter bank + 6-digit sort + 8 digits |
| Ireland | IE | 22 | 4-letter bank + 6-digit NSC + 8 digits |
| Bahrain | BH | 22 | 4-letter bank + 14 alphanumeric |
| Switzerland | CH | 21 | 5-digit IID + 12-char account |
| France | FR | 27 | 5-digit bank + 5-digit branch + 11 + 2 |
| Jordan | JO | 30 | 4-letter bank + 4-digit branch + 18 |
| Malta | MT | 31 | 4-letter bank + 5-digit sort + 18 |
These lengths are set by the SWIFT IBAN Registry and do not change without formal notification.
Practical uses for this reference
- Sanity-checking inbound data. If a payment system receives an IBAN, the first automated check should be length against the country code. A 22-character IBAN starting with
FRis obviously wrong (France is 27), regardless of whether the checksum passes. - Form validation. Building a payment form that accepts IBANs? The country-length table lets you set the correct
maxlengthattribute and give the user an immediate hint if their entry is clearly too long or too short. - Debugging wire rejections. When a SWIFT payment bounces with a format error, comparing the received IBAN length against the expected length for its country is a quick first diagnostic step.
Tips and examples
GB(United Kingdom) IBANs are 22 characters:GBkk BBBB SSSS SSAA AAAA AA.- The check digits alone catch most typos, but a wrong country code makes the length check fail first — always confirm the leading two letters.
- Strip all spaces and uppercase the string before validating; mixed case or stray spaces are the most common false-failure cause.