Skip to main content
Finance Tools 8 min read

IBAN Structure and Check Digits: How to Read and Verify an IBAN

What each part of an IBAN means, how MOD-97 check digits work, a worked example you can repeat by hand, and what a passing checksum does not prove.

Updated 2026-09-11

An IBAN is a fixed-length identifier: a country code, two check digits, and a national account format. The check digits catch typos before money moves - move the first four characters to the end, turn letters into numbers, and the remainder modulo 97 must be exactly 1.

This guide breaks the format apart by country, walks through the MOD-97 arithmetic with numbers you can reproduce on paper, and covers the input errors that break validation.

The four parts of an IBAN

IBAN stands for International Bank Account Number and is standardised in ISO 13616. It uses only uppercase letters and digits and is at most 34 characters long. The spaces are a reading aid: banks print groups of four so a person can compare the number with a statement; the spaces are not part of it.

The four parts, using DE89 3704 0044 0532 0130 00
PartPositionsExampleWhat it identifies
Country code1-2DEThe country whose registry defines the format.
Check digits3-489Calculated from the rest of the string (ISO 7064 MOD-97-10).
Bank identifier5-1237040044The bank in the national format; here the 8-digit Bankleitzahl.
Account number13-220532013000The customer account. Some countries put a branch or national check digit in this segment.

Only the first four characters mean the same thing everywhere. From position 5 onward you are reading the BBAN, the Basic Bank Account Number, whose internal layout is set nationally.

The checker here strips spaces and hyphens and uppercases the input first, so spaced and unspaced forms of the same IBAN are the same input.

The BBAN: why the rest of the string differs by country

Two IBANs from different countries have little in common beyond those four characters. Lengths vary - in the country table used here, Norway is 15 characters and Saint Lucia is 32 - and each country splits its BBAN differently.

IBAN length and BBAN layout in some common countries
CountryLengthBBAN layout
Germany (DE)228-digit bank code (Bankleitzahl) + 10-digit account
United Kingdom (GB)224-letter bank code + 6-digit sort code + 8-digit account
France (FR)275-digit bank + 5-digit branch + 11-character account + 2-digit national check
Italy (IT)271 letter (CIN) + 5-digit bank (ABI) + 5-digit branch (CAB) + 12-character account
Spain (ES)244-digit bank + 4-digit branch + 2 check digits + 10-digit account
Netherlands (NL)184-letter bank code + 10-character account
Norway (NO)154-digit bank code + 6-digit account + 1 check digit

Because segmentation is national, a parser needs a per-country table of offsets. This site's checker splits bank code, branch code and account number that way, and fills the branch field only where the country table defines one. In countries with a branch code, the last BBAN characters are often a national check digit rather than part of the account.

Length is part of the format: an IBAN is always exactly the length its country defines, so a 21-character string starting with DE cannot be a valid German IBAN.

The check digits: ISO 7064 MOD-97-10 in five steps

The check digits are arithmetic, not something a bank allocates: ISO 13616 points at the ISO 7064 MOD-97-10 scheme.

  1. Remove spaces and hyphens and uppercase the string.
  2. Move the first four characters, the country code plus the check digits, to the end.
  3. Replace each letter with two digits by alphabet position: A is 10, B is 11, up to Z as 35.
  4. Read the result as one long integer.
  5. Take it modulo 97 and look at the remainder. A valid IBAN leaves exactly 1.

Step 4 is the awkward one by hand: a German IBAN converts to 24 digits and longer countries exceed 34. Work in chunks of about nine digits and keep only the running remainder - multiply it by ten to the power of the chunk length, add the chunk, then take the remainder modulo 97 again. Programs hit the same wall, which is why the check needs a big-integer type.

A remainder of 0 is not a special code for some other kind of failure. Like 2 or 96, it simply means the string is invalid.

A worked example you can check by hand

Take the Norwegian IBAN NO93 8601 1117 947. At 15 characters it is short enough for paper, and every intermediate result below was verified by calculation.

  1. Split it: country code NO, check digits 93, BBAN 86011117947.
  2. Move the first four characters to the end: 86011117947NO93.
  3. Convert the letters: N is 23 and O is 24, so the number is 86011117947232493, which is 17 digits.
  4. Reduce in chunks: 860111179 mod 97 = 54, then (54 x 100000000 + 47232493) mod 97 = 1.
  5. The remainder is 1, so the check digits are consistent with the rest of the string.

A longer IBAN behaves the same way. DE89 3704 0044 0532 0130 00 becomes 370400440532013000DE89, then 370400440532013000131489 once D is 13 and E is 14. Chunking gives 370400440 mod 97 = 23, then (23 x 1000000000 + 532013000) mod 97 = 16, then (16 x 1000000 + 131489) mod 97 = 1.

Where the two digits come from in the first place

Generating check digits runs the same arithmetic backwards: append the country code and two zeros to the BBAN, convert, take the remainder modulo 97, then subtract it from 98. For the Norwegian BBAN the remainder is 5, and 98 - 5 = 93, exactly the 93 in NO93. The same recipe gives 89 for the German example and 82 for GB82 WEST 1234 5698 7654 32.

None of this needs a network or a bank database - the checker here runs the whole calculation in your browser. Its only request is the optional bank name and BIC lookup for a bank code, which contains just the country code and that bank code.

What a passing checksum proves, and what it does not

A checksum is a typo detector, not proof that an account exists. The gap between those ideas is where payments go wrong: valid IBAN gets read as this account is real.

  • What it proves: the country code is supported, the length matches that country, only uppercase letters and digits are used, and the check digits agree with the rest of the string.
  • What it catches: a wrong digit, a wrong letter, a missing or extra character, and almost any swap of two adjacent characters.
  • What it cannot prove: that the account is open or was ever issued, that the holder is who you think, that the bank code belongs to the institution you wrote down, or that a payment will be accepted.
  • What a bank lookup adds: the bank code is assigned to an institution in a national registry. It says nothing about an individual account.

Closed accounts keep structurally valid IBANs, because the check digits depend on characters rather than account status, and an IBAN from an old invoice stays valid after the bank has merged or been renamed.

Treat a passing checksum as the first step of a payment check. Confirming the holder name and agreeing the amount with the recipient are steps no IBAN validator can perform for you.

The input errors that break validation most often

Most failed validations are mundane:

  • Spaces, hyphens and line breaks from copy and paste: harmless here, because the checker strips them and uppercases the input first.
  • Full-width characters from a Chinese or Japanese input method. Full-width DE89 is not ASCII DE89: those characters are not A-Z or 0-9, so the tool reports invalid characters rather than a checksum failure. Switch the input method to half-width.
  • A BIC or SWIFT code in the IBAN field. A BIC such as DEUTDEFF is 8 or 11 characters and identifies a bank; an IBAN identifies one account at a bank. Neither can be derived from the other.
  • A national account number pasted instead of an IBAN: it fails the length check at once, because an IBAN is longer and starts with a country code.
  • A truncated paste, usually a dropped final character, which fails the country length check before any arithmetic runs.
  • Two digits swapped while retyping. Swapping two digits inside the German bank code turns DE89 3704 0044 0532 0130 00 into a string whose remainder is 28 instead of 1; changing the check digits by one, as in DE88 3704 0044 0532 0130 00, leaves a remainder of 0.

The error message says which stage failed. Expected 22 characters, got 21 means the paste was short; a MOD-97 failure means the characters themselves are wrong.

An IBAN is a country code, two check digits and a nationally defined account format, and the MOD-97 remainder tells you whether the characters are consistent. The IBAN checker on this site runs that arithmetic in your browser and can look up the bank name and BIC behind a bank code.

Frequently asked questions

Does a valid IBAN mean the account exists?

No. The check digits only show that the characters are internally consistent and that the length and country code are supported. Whether an account is open is known only to the bank that holds it, so confirm the holder name and details with the recipient before sending money.

How long can an IBAN be?

ISO 13616 allows up to 34 characters, and each country uses one fixed length. In the country table used here that ranges from 15 characters for Norway to 32 for Saint Lucia, with the Netherlands at 18 and Germany, the United Kingdom and Switzerland in the low twenties.

Is the IBAN the same as a BIC or SWIFT code?

No. A BIC, also called a SWIFT code, is 8 or 11 characters and identifies a bank or one of its branches. An IBAN identifies a specific account and carries a country code plus two check digits.

Why do banks print an IBAN in groups of four?

It is a reading aid: groups of four are easier to compare with a printed statement or to read aloud. The grouping is discarded before any calculation, so it makes no difference to the check digits.

Can I validate an IBAN without an internet connection?

The arithmetic is deterministic and needs no network, so once the page has loaded the MOD-97 calculation runs entirely in your browser. Only the optional bank name and BIC lookup for a bank code requires a request, and it does not include the account number.

Tools used in this guide

More guides