Skip to main content
Finance Tools 9 min read

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

What each part of an IBAN means, the five steps of MOD-97 with a worked example you can repeat by hand, and exactly what a passing checksum proves — and what it does not.

Written by Faruq Zhao Updated 2026-10-31

An IBAN (International Bank Account Number) comes down to one sentence: the first two characters are a country code, the next two are check digits, and everything after that is the country's own account format. The only part doing real error-catching work is those two check digits — move the country code and check digits to the end, turn every letter into a number, and the remainder of the long integer divided by 97 must be exactly 1.

The check digits catch typos, not forgery. They exist to detect swapped and mistyped characters, and a perfectly well-formed IBAN that belongs to nobody will pass with flying colors. The quickest way to understand why is to run the arithmetic by hand once — which is what this guide is for. Every intermediate result below has actually been computed; you can check each step with pencil and paper.

Companion tools: this site's IBAN validator runs the mod-97 arithmetic in your browser and splits out the bank code, branch code and account fields. To go the other way — generating a German IBAN from a BLZ and account number — use the IBAN calculator.

The four parts of an IBAN

An IBAN is defined by ISO 13616 and uses only uppercase letters and digits, up to 34 characters in total. The spaces you see on statements are purely for human eyes: banks print them in groups of four so you can compare a number against a statement line by line. The spaces are not part of the account number — every implementation strips them before doing anything else.

Each segment, using the German IBAN "DE89 3704 0044 0532 0130 00" as the example

Segment Position Example Meaning
Country code 1–2 DE The country whose registry defined this account format
Check digits 3–4 89 Computed from the whole string, per ISO 7064 MOD-97-10
Bank code 5–12 37040044 The institution identifier, in each country's own format — here an 8-digit Bankleitzahl (BLZ)
Account number 13–22 0532013000 The account itself; some countries put branch codes or their own check digits inside this stretch

Only the first four characters mean the same thing in every country. From position 5 onward it is the BBAN (Basic Bank Account Number), and how it is carved up is decided by each national registry independently.

Normalization: the validator strips spaces and dashes and uppercases everything first, so "de89 3704 0044 0532 0130 00" and "DE89370400440532013000" are the same input.

BBAN: why the back half looks different in every country

Past the first four characters, two different countries' IBANs have almost nothing in common. Even the lengths vary: the shortest in this site's country table is Norway at 15 characters; the longest is Russia at 33. The BBAN splits differ just as much.

Common countries' lengths and BBAN structures

Country Length BBAN structure
Germany DE 22 8-digit bank code (Bankleitzahl) + 10-digit account
United Kingdom GB 22 4-letter bank code + 6-digit sort code + 8-digit account
France FR 27 5-digit bank + 5-digit branch + 11-digit account + 2 national check digits
Italy IT 27 1 letter (CIN, national check character) + 5-digit bank code (ABI) + 5-digit branch code (CAB) + 12-digit account
Spain ES 24 4-digit bank + 4-digit branch + 2 national check digits + 10-digit account
Netherlands NL 18 4-letter bank code + 10-digit account
Norway NO 15 4-digit bank code + 6-digit account + 1 national check digit

Since every registry sets its own layout, a parser has to keep a table of "which positions mean what" per country. That table is exactly what this site's tool uses to slice out the bank code, branch code and account number — and only countries whose table entry defines a branch field will ever show one. Where a branch concept exists, the BBAN often ends with a national check digit, so the account field the tool displays is shorter than the BBAN itself.

A wrong length fails immediately, before the check digits ever get a say: an IBAN's length is fixed per country, so a 21-character string starting with DE cannot be a valid German IBAN.

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

The check digits are not random and not assigned by banks — they are computed. ISO 13616 specifies the ISO 7064 MOD-97-10 scheme, and the whole procedure is five steps:

Clean and normalize

Strip spaces and dashes; uppercase the whole string. Full-width characters (the kind a CJK input method produces) are not in the allowed alphabet and get caught by the character check just after this step.

Rearrange

Move the first four characters — country code plus the two check digits — to the end. The Norwegian "NO93 8601 1117 947" becomes "8601 1117 947 NO93".

Letters to numbers

Each letter becomes a two-digit number by its alphabet position: A becomes 10, B becomes 11, all the way to Z becoming 35. So N becomes 23 and O becomes 24.

One long integer

Treat the result as a single very long integer. The Norwegian example expands into 17 digits; the German one into 24.

Take the remainder

Reduce it modulo 97 and look only at the remainder: a valid IBAN leaves a remainder of exactly 1. A remainder of 0 is not a special error code — like 2 or 96, it just means the string is invalid.

Why 97

97 is prime and larger than any single decimal digit, and those two properties are what give the scheme its detection power. Change any one digit and the value shifts by the digit difference times a power of ten; swap two adjacent digits and it shifts by their difference times 9 times a power of ten. Because 97 is prime, neither factor can cancel — both error classes always show up in the remainder.

Step 4 is the awkward one by hand: no pocket calculator holds a 24-digit number. The workaround is chunked reduction — take about nine digits at a time, multiply the running remainder by the matching power of ten, add the chunk, and reduce modulo 97 again. Programmers face the same problem, which is why the code has to use a big-integer type rather than a native int.

A worked example: every number reproducible

Take the Norwegian "NO93 8601 1117 947" — 15 characters, small enough for pencil and paper:

Split into three parts

Country code NO, check digits 93, BBAN 86011117947.

Rearrange and convert

Move the first four to the end: 86011117947NO93. Convert letters (N is 23, O is 24) to get the 17-digit integer 86011117947232493.

Reduce in chunks

860111179 mod 97 = 54; then (54 × 100000000 + 47232493) mod 97 = 1.

Verdict

Remainder 1: the check digits 93 are consistent with the rest of the string — a structurally valid Norwegian IBAN.

Longer IBANs take the same road. The German "DE89 3704 0044 0532 0130 00" rearranges to 370400440532013000DE89, and with D as 13 and E as 14 you get the 24-digit integer 370400440532013000131489. Chunked reduction gives 370400440 mod 97 = 23, then (23 × 1000000000 + 532013000) mod 97 = 16, then (16 × 1000000 + 131489) mod 97 = 1.

Where the two check digits come from in the first place

Run the same arithmetic backwards and you can generate them: append the country code and two zeros to the BBAN, convert the letters to digits, reduce modulo 97, and subtract the remainder from 98. The Norwegian BBAN 86011117947 leaves a remainder of 5, and 98 − 5 = 93 — exactly the 93 in NO93. The same routine produces 89 for the German example and 82 for "GB82 WEST 1234 5698 7654 32".

Zero-upload architecture: none of this needs a network or a bank database — this site's IBAN validator does the entire mod-97 computation inside your browser. The only request it ever makes is the optional bank-name and BIC lookup, and that request carries the country code and bank code only — never the account part.

What a passing check proves — and what it doesn't

The check digits are a typo filter, not proof of an account. The gap between those two things is exactly where transfer mistakes breed — many people read "valid IBAN" as "this account exists and belongs to the person I'm paying."

What it proves

The country code is covered, the length matches that country's fixed value, only uppercase letters and digits appear, and the check digits are consistent with the rest.

What it usually catches

A mistyped digit, a mistyped letter, one character too many or too few, and virtually every adjacent-character swap.

What it cannot prove

Whether the account is still open, whether it was ever issued, whether the holder is who you think they are, whether the bank code belongs to the institution you copied from, and whether a payment would land.

What the bank lookup adds

That the bank code is assigned to some institution in the national registry — it knows nothing about any particular account.

A closed account usually still has a perfectly valid IBAN, because the check digits only ever see characters, never account status; an IBAN copied from an old invoice can be structurally flawless while the bank behind it has long since been merged or renamed.

Treat a passing checksum as the first step of payment verification, not the last. Checking the payee's name and confirming the amount and purpose with them are steps no IBAN checker can do for you.

The most common input errors

Failures are overwhelmingly mundane, roughly in this order:

  • Spaces, dashes and line breaks carried in by copy-paste — harmless here, since the tool strips and uppercases before doing anything.
  • Full-width characters from a Chinese or Japanese input method — full-width DE89 is not the same string as DE89, and the character check fails with "invalid character", not a checksum error. Switch the input method back to half-width and re-paste.
  • A BIC or SWIFT code pasted into the IBAN box — a BIC like DEUTDEFF is 8 or 11 characters and identifies a bank; an IBAN identifies an account at a bank, and neither derives the other.
  • A national account number pasted in as an IBAN — it dies on the length check, because IBANs are longer and start with a country code.
  • A truncated paste, usually losing the last character — the length changes, the country length check fires first, and the checksum never runs.
  • Two digits swapped while re-typing — swap two digits inside the German bank code and the remainder of "DE89 3704 0044 0532 0130 00" moves from 1 to 28; change the check digit itself (DE88…) and you get 0.

The error message tells you where it died: "expected 22 characters, got 21" means the paste came up short; "MOD-97 check failed" means the characters themselves are wrong.

FAQ

Does a passing IBAN check mean the account exists?

No. It means the string is internally consistent and matches the country's length and alphabet. Only the issuing bank knows whether the account is open — confirm the name and account with your payee before sending.

How long can an IBAN be?

ISO 13616 caps it at 34 characters, and each country uses one fixed length. Of this site's 89 countries the shortest is Norway at 15 and the longest Russia at 33; the Netherlands is 18, while Germany, the UK and Switzerland sit in the low twenties. The full per-country table is in IBAN lengths and formats for 89 countries.

Are an IBAN and a BIC (SWIFT code) the same thing?

No. A BIC (Business Identifier Code) — 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 its own country code and check digits. Cross-border transfers usually need both. How the two identifiers map to each other is covered in How an IBAN's bank code becomes a BIC.

Why do banks print IBANs in groups of four?

Purely for humans. Four-character groups are easier to check against a paper statement line by line, and easier to read out over the phone. The grouping is discarded before any computation and has no effect on the check digits.

Can I verify an IBAN offline?

Yes. Mod-97 is deterministic, and once the page has loaded the whole check runs in your browser with no network. Only the optional bank-name and BIC lookup makes a request, and that request does not include the account part.

Further reading

Faruq Zhao

I build and maintain zztools.org — the tools, the guides, and the reference data behind them. If something on this page is wrong, write to support@zztools.org: it reaches me, not a ticket queue.

Tools used in this guide

More guides