Guides

IBAN Structure Explained: Country Code, Check Digits and BBAN

Quick answer: what is inside an IBAN?

An IBAN combines a two-letter country code, two check digits and a country-specific Basic Bank Account Number (BBAN). The BBAN contains the domestic bank and account details. The exact length and structure depend on the country.

Use our IBAN checker to test the format and check digits before sending a payment.

The four visible parts of an IBAN

For example, an IBAN may look like DE89 3704 0044 0532 0130 00 when grouped for readability:

  1. Country code: DE identifies Germany.
  2. Check digits: 89 help detect transcription errors.
  3. BBAN: the remaining characters contain the domestic bank and account information.
  4. Printed grouping: spaces make the number easier to read but are normally ignored during validation.

The example is for explaining the structure. It should not be used as payment data.

What are IBAN check digits?

The check digits are calculated with the international MOD-97 method. A validator rearranges the number, converts letters to numbers and checks whether the resulting remainder is correct. This catches many common errors, such as a missing digit or a transposed pair of characters.

Check digits do not prove that an account exists, that it is active or that the recipient owns it. They are a mathematical integrity check, not an identity check.

Why does the IBAN length vary by country?

There is no single length for every IBAN. Each country defines the format of its BBAN, so the total length and the position of bank identifiers vary. A country-aware validator is therefore safer than applying one fixed pattern to all accounts.

See the supported countries for country-specific IBAN checks.

IBAN, BBAN and BIC: what is the difference?

The BBAN is the domestic account structure inside an IBAN. The BIC identifies a bank or branch in the SWIFT network. An IBAN is used to identify the payment account, while a BIC can provide additional bank-routing information. Read our guide to IBAN vs. BIC for the practical differences.

The main parts of an IBAN

An IBAN has a common international prefix followed by a national account structure. The first two letters identify the country in the international format. The next two digits are check digits calculated from the rest of the number. The remaining characters form the BBAN, or Basic Bank Account Number, defined by the national banking system.

The BBAN can contain a bank identifier, branch identifier, account number and additional national check characters. These components are not arranged identically in every country. In one country the bank code may appear immediately after the check digits; in another, the account number and branch information can be interleaved. Reading the characters correctly requires the country’s specification.

Why IBAN check digits matter

The check digits provide a mathematical consistency check for the complete IBAN. In simplified terms, the validation moves the country code and check digits to the end, converts letters to numbers, and checks the resulting value using the international modulo-97 rule. A single mistyped character will often cause the calculation to fail.

This is valuable for data entry, but it is not an ownership check. An incorrectly entered IBAN may fail immediately, while a correctly formed IBAN can still be the wrong beneficiary’s account. Always combine the technical result with a separate recipient and payment verification process.

Country formats are deliberately different

Country-specific lengths and character rules prevent a single universal regular expression from being reliable. Germany uses a numeric national part with a fixed overall length. France includes a two-character key in addition to the country prefix and check digits. Spain permits letters in some positions, while the Netherlands uses a letter in its current national pattern. Other countries use variable lengths or national identifiers with their own check rules.

The country code therefore determines more than the first two characters. It selects the expected total length, allowed alphabet, BBAN layout and sometimes additional validation logic. A validator should select those rules from the country code and reject unsupported or ambiguous input clearly.

Normalizing an IBAN safely

Paper documents commonly group IBAN characters in blocks of four, while electronic systems usually store the compact form. Removing spaces is a presentation change and is normally safe when the characters themselves remain unchanged. Preserve the original input for traceability and avoid removing letters, leading zeroes or country information. If a scanned document contains an unclear character, ask the account holder or bank for confirmation.

Systems should also define how lower-case input, punctuation and copy-and-paste line breaks are handled. Normalize only the characters allowed by the application’s rules, then validate the result. Displaying a normalized value back to the user gives them an opportunity to catch a transcription error before a payment is sent.

Using structure checks in practice

Use the structure as an early quality gate in forms, supplier onboarding and payment approval. Select the country explicitly, run the IBAN checker, and show whether the failure concerns characters, length or check digits. Then verify that the account belongs to the intended recipient and that the payment request is legitimate.

Keeping these stages separate avoids two common mistakes: rejecting a valid number because it was judged by the wrong country rule, and treating a mathematically valid number as proof that a payment is safe. The structure is a strong error-detection tool, not a complete banking identity service.

Why structure and ownership must stay separate

The structure is designed to reduce routing and transcription errors, not to identify the account holder. Two different accounts can each have a completely valid IBAN, and a fraudster can provide a technically correct account number. Use the structure check at the data-entry stage, then verify the beneficiary and the payment request through an independent process.

FAQ: IBAN structure

Does every country use the same IBAN format?

No. The country code, total length and BBAN structure differ by country.

Can check digits prove that an IBAN is real?

No. They show that the number is mathematically plausible. They do not confirm an active account or the recipient’s identity.

Should spaces be removed before checking an IBAN?

Most validators ignore spaces, but removing formatting characters is useful when importing or comparing payment data.

Summary

An IBAN consists of a country code, check digits and a country-specific BBAN. Understanding the structure helps you spot obvious errors, while an IBAN validation provides a quick technical check before a transfer.

Source: SWIFT IBAN registry.

Validate any IBAN

Currently supporting 74 countries

The IBAN validation is performed exclusively in accordance with the international standard ISO 7064. No data is stored or shared with third parties.