IBAN Validation Explained: Mod-97, Lengths & Error Codes

🏦 Payments⏱️ 6 min readFree tool included
An IBAN looks like a random string of letters and digits, but it's engineered so a computer — or a patient human — can catch any typo before money leaves your account. This guide walks the four checks every real validator runs, computes a checksum by hand, and draws the line between "well-formed" and "the account exists," which is where most expensive misunderstandings live.

What is an IBAN, and how is it built?

An International Bank Account Number wraps a country's domestic account number in a standard envelope. The first two letters are an ISO country code, the next two digits are check digits, and everything after is the domestic account number, called the BBAN (Basic Bank Account Number). The UK's GB82 WEST 1234 5698 7654 32 is a country (GB), a checksum (82), then a sort code and account number squeezed into 18 characters.

Countries joined at different times and with different domestic numbering systems, so IBAN length varies: 15 characters in Norway, 18 in the Netherlands, 22 in the UK and Germany, 27 in France and Italy, and 29 in Brazil. The registry currently covers 97 countries, of which 37 are in SEPA. That's why "is it 22 characters?" is only a meaningful check once you know the country.

How does the mod-97 checksum actually work?

The check digits exist to make typos detectable, using ISO 7064 MOD 97-10 arithmetic. The recipe, on our GB example:

  1. Take the IBAN without spaces: GB82WEST12345698765432.
  2. Move the first four characters (country + check digits) to the end: WEST12345698765432GB82.
  3. Replace each letter with its alphabet position plus 9 — A=10, B=11, …, Z=35. W=32, E=14, S=28, T=29, G=16, B=11:
321428 2912345698765432 1611 82
= 3214282912345698765432161182
  1. Treat that as one huge integer and divide by 97. The remainder is exactly 1 — valid. Any other remainder fails.

Now the payoff: change the final 2 to a 1, the way a finger slips on the keyboard. The number becomes 3214282912345698765431161182, and the remainder jumps to 71. One digit, one arithmetic step, and the error is caught. The scheme detects every single-digit substitution and nearly all transpositions, which is why it was chosen for exactly this job.

What are the four checks a validator runs?

Format, in increasing order of effort:

Good validators report which check failed, not just a red X. "Unknown country" means you're probably validating a routing number. "Checksum failed" means one digit somewhere is wrong — and some tools, ours included, will tell you which check digits would fit the rest of the number, which solves the case where the check digits themselves were the typo.

What can an IBAN validator tell you — and what can't it?

A validator confirms structure. It cannot confirm the account is open, belongs to the person who gave it to you, or accepts the currency you're sending. That confirmation only happens inside the banking system, when your payment is attempted — or, increasingly, through name-checking services: the EU's Verification of Payee regulation phases in from 2025 to 2027, letting payment providers match the beneficiary name against the account before funds move.

The practical division of labor: run the validator to kill typos cheaply, then let the bank's own checks (or a Verification of Payee service where available) confirm the account. A green validator result is "safe to hand to your bank," never "guaranteed to arrive."

How do you validate a batch of IBANs privately?

Invoice runs and payroll files mean dozens or hundreds of IBANs, and pasting a customer list into a random upload-based checker is a data-protection problem dressed as a convenience. The clean options: an in-browser validator where the JavaScript does the math on your machine (watch the network tab — zero requests after load), a spreadsheet formula for the length check, or a script against an offline library like ibantools. Our IBAN validator takes one IBAN per line, runs all four checks per line, and nothing you paste ever leaves the page.

Which countries don't use IBANs — and what do you use instead?

The United States, Canada, Australia, Japan, China, India, and Mexico all stayed out. To pay a US account internationally you use the bank's SWIFT/BIC code plus the domestic account details — routing number and account number — and your bank maps it into whatever the receiving corridor needs. A "US IBAN" you see printed on a US bank statement page is really just those domestic numbers bundled for display; feeding it to a validator correctly returns an unknown-country error.

Validate an IBAN right now — nothing uploaded

Paste one IBAN or a hundred. Checksum, country, length, and structure checks, all local.

Open the IBAN Validator →

The bottom line

Four checks — country, length, structure, mod-97 — catch essentially every typo before money moves. Lengths are per-country (15 to 29 characters across the 97-country registry), the checksum is one division with a target remainder of 1, and no format check can prove an account exists. For the neighboring problems: card numbers carry the same idea in the Luhn check on our card validator, and phone numbers get their own country-rule treatment on the phone number validator.

Advertisement

Frequently Asked Questions

How do I check if an IBAN is valid?

Check the country code against the 97-country IBAN registry, the length against that country's rule, the BBAN against the country's letter/digit structure, and compute the mod-97 checksum — it must leave remainder 1. A free in-browser validator such as ToolAspect's runs all four checks locally and handles batches, one IBAN per line, without uploading anything.

Does a valid IBAN mean the account exists?

No. Valid means well-formed: right country, right length, right structure, checksum passes. It catches typos before money moves, but only the receiving bank can confirm an account is open — usually when the payment is attempted. Your bank may also run an IBAN-name check (the EU's Verification of Payee service arrives in 2025-2027) which a format validator cannot replace.

Why does the US not use IBANs?

The US chose not to join the IBAN registry, along with Canada, Australia, Japan, China, India, and Mexico. American accounts keep their domestic form — a 9-digit routing number plus an account number — and cross-border wires to them are routed by SWIFT/BIC code instead. Any "US IBAN" you see is not a real IBAN and will fail country validation.

Related Tools