IBAN Structure Explained: Country Code, Check Digits and BBAN
How an IBAN is built: country code, Mod-97 check digits and the BBAN. The structure of the International Bank Account Number explained step by step, with a worked example.
A German IBAN is 22 characters long, starts with DE and looks at first glance like a random string of numbers. In reality there is clear logic behind every block: a country identifier, a mathematical checksum, a bank code and an account number. Once you understand the structure, you can spot typos instantly and derive the BIC from the IBAN. This article takes an IBAN apart piece by piece and shows the Mod-97 method you can use to check it yourself.
What the IBAN actually is
The IBAN (International Bank Account Number) is an internationally standardised account number. It follows the ISO 13616 standard, which has existed since 1997 and has been mandatory for all euro accounts in Europe since 2014. The goal: cross-border bank transfers should work just as easily as transfers inside a single country, without the sender needing to know which national account-number formats apply abroad.
The IBAN does not replace the national account number, it wraps around it. A German IBAN contains the old eight-digit bank code and the account number of up to ten digits unchanged, simply framed by a country code and check digits.
The length varies a lot: Norway has the shortest IBANs at 15 characters, while Malta and some Caribbean countries have the longest at 31 to 34 characters. In Germany it is always exactly 22 characters.
The three parts of an IBAN
Every IBAN consists of three fixed building blocks, in exactly this order.
1. Country code (characters 1 and 2)
The first two letters identify the country according to ISO 3166. The code is fixed and follows the same logic as domain endings (.de, .at, .ch).
| Country | Code | IBAN length |
|---|---|---|
| Germany | DE | 22 |
| Austria | AT | 20 |
| Switzerland | CH | 21 |
| Liechtenstein | LI | 21 |
| France | FR | 27 |
| Italy | IT | 27 |
| Netherlands | NL | 18 |
| Belgium | BE | 16 |
| Luxembourg | LU | 20 |
| United Kingdom | GB | 22 |
| Ireland | IE | 22 |
| Spain | ES | 24 |
| Portugal | PT | 25 |
| Denmark | DK | 18 |
| Norway | NO | 15 |
| Poland | PL | 28 |
| Czechia | CZ | 24 |
| Malta | MT | 31 |
The complete list is held in the SWIFT IBAN Registry and in our IBAN country overview.
2. Check digits (characters 3 and 4)
The check digits are the heart of the IBAN. They are calculated using the Mod-97-10 method (ISO 7064) and catch more than 99 percent of all typos: transposed digits, missing digits, swapped blocks. That is a safeguard the old German bank code plus account number never had.
The principle in four steps:
- Rearrange the IBAN: move the first four characters (country plus check digits) to the end.
DE89 3704 0044 0532 0130 00becomes3704 0044 0532 0130 00 DE 89. - Convert letters to numbers: A=10, B=11, C=12, …, Z=35. DE becomes 1314.
- Divide the resulting huge number by 97.
- The remainder must be exactly 1. If it is not 1, the IBAN is invalid.
In the example, the rearranged sequence reads 3704004405320130001314 89. Divided by 97, the remainder is 1. The IBAN is correct.
When a new IBAN is generated, the process runs in reverse: the bank works out the check digits so that the remainder of the test is always 1. That is why the check digits of a freshly issued account are not predictable and appear to vary at random between 01 and 98 (the values 00 and 99 effectively never occur).
3. BBAN: the national account number (character 5 to the end)
The BBAN (Basic Bank Account Number) is the country-specific part. This is where the real bank and account data live, and the format varies considerably from one country to the next.
Germany (14 digits): 8 digits of bank code plus 10 digits of account number (usually padded with leading zeros). Austria (16 digits): 5 digits of bank code plus 11 digits of account number. Switzerland (17 characters): 5 digits of BC number (bank clearing) plus 12 digits of account number. United Kingdom (18 characters): 4 letters of bank code plus 6 digits of sort code plus 8 digits of account number. Malta (23 characters): 4 letters of bank code plus 5 digits of branch code plus 18 characters of account number.
The German format is comparatively compact; many southern European countries have account-number segments twice as long.
Worked example: the IBAN DE89 3704 0044 0532 0130 00
Let us take the example IBAN apart character by character:
| Position | Value | Meaning |
|---|---|---|
| 1-2 | DE | Country code Germany (ISO 3166) |
| 3-4 | 89 | Check digits (Mod 97-10) |
| 5-12 | 37040044 | Bank code Commerzbank Cologne |
| 13-22 | 0532013000 | Account number (10 digits, leading zeros) |
The bank code 37040044 determines the BIC: COBADEFFXXX (Commerzbank, Frankfurt am Main, head office). Our IBAN validator does exactly this lookup automatically: it extracts the bank code, looks it up in the Bundesbank file and shows the bank, location and BIC.
Checking the IBAN: why every mistake costs
A typo in the IBAN has three possible consequences, sorted by likelihood:
1. The transfer is rejected. The most common case: the check digits do not add up. The bank does not even pass the IBAN to the SEPA network, and you get an immediate error message.
2. The transfer goes to the wrong account. This happens less often, but it is dangerous: if a typo happens to produce a valid IBAN belonging to another account, the money goes to the wrong recipient. Until October 2025, getting it back was complicated. Today the new Verification of Payee (a name check before execution) should largely prevent this.
3. The transfer is carried out but cannot be allocated. This occurs when only the account number is wrong and the target account simply does not exist. Your bank gets the money back after a few days with a return fee (typically 5 to 15 euros).
Common sources of error:
- Transposed digits, for example 37040044 instead of 37004044 (still the wrong bank).
- Mixing up similar characters, such as 0/O, 1/l, 8/B. There are no letters in the national parts of German accounts, but foreign banks do use letters (GB, MT, PL).
- Dropped leading zeros in the account number. The bank expects 10 digits in the German part; anyone who writes “532013” instead of “0532013000” produces a Mod-97 error straight away.
A quick check with the IBAN validator takes two seconds and catches all three types of error.
Special cases and edge cases
The IBAN-only rule: since February 2016, SEPA transfers may no longer require the BIC; the IBAN alone is enough. There is more on this in the guide SEPA transfer: is a BIC needed?.
IBANs outside Europe: many countries have adopted the IBAN, for example Israel (IL, 23 characters), Turkey (TR, 26), Saudi Arabia (SA, 24) and Brazil (BR, 29). Others have not: the United States, Canada, Australia, China, Japan, India. There you find national account-number standards (account number plus routing code), and transfers to those countries run over SWIFT with a BIC.
Virtual IBANs (vIBANs): payment providers such as Stripe, Wise or N26 sometimes issue “virtual” IBANs that point to a pooled account. Technically they look like normal IBANs and pass the Mod-97 check. But the bank behind them is not necessarily the country in the country code (you can be given a German virtual IBAN even though your Stripe payment runs through an Irish bank).
Frequently asked questions
Can you memorise an IBAN? Your own: yes, after a few transfers. Other people’s: no need, since you can save recipients in online banking.
Is every IBAN unique worldwide? Yes. The combination of country code, check digits and BBAN is unique. Two accounts cannot have the same IBAN, neither within a country nor across borders.
Why do some countries have such long IBANs? Because their national account identifiers are longer. Malta’s banking system uses 18-digit account numbers plus a bank code plus a branch code, which adds up to 31 characters.
Can an IBAN change? Rarely. After a bank merger the old account may stay valid in parallel for a while and be switched over later. Moving an account to the same person at the same bank does not change the IBAN.
What is the difference between an IBAN and a BBAN? The BBAN is the national account number without the European frame. IBAN = country code + check digits + BBAN. The BBAN on its own is enough for transfers within the same country, but not for SEPA-wide transfers.
Key takeaways
The IBAN is not a random number but a precisely structured data field: two letters for the country, two digits for the checksum, then the national account number. The Mod-97 check digits filter out practically every typo, and the BIC can be derived from the German bank code (digits 5 to 12). Once you have understood the structure, you can spot an incorrect IBAN at a glance, or use the IBAN validator, which does the whole thing in milliseconds.
Sources
ByMateusz Viola · Last reviewed