The IBAN used to send money to a bank account is not a randomly generated string of digits; it has a defined structure and a mathematical check mechanism. In this article we look at what an IBAN is, how it is structured and which algorithm its check digits (checksum) are calculated with.

What is an IBAN, and why does it exist?

The IBAN (International Bank Account Number) is a structure designed to express bank account numbers across countries in a standard form. An IBAN consists of a country code (2 letters), check digits (2 digits) and a country-specific account identifier. The purpose of this standardisation is to let banks in different countries validate an account number structurally before money is actually routed — that is, whether the number is formally consistent can be checked before the transfer takes place.

Without a check mechanism of this kind, an incorrectly entered account number is only noticed once the transaction has started moving between banks and is rejected, sometimes days later. Thanks to the check digits, an obvious and simple typo can be caught instantly, before the transaction even begins: while a form is being filled in or an IBAN is being saved.

The structure of an IBAN

PartLengthWhat it is for
Country code2 lettersISO country code (e.g. <code>TR</code>, <code>DE</code>, <code>GB</code>)
Check digits2 digitsChecksum calculated with the MOD 97-10 algorithm
Account identifier (BBAN)Varies by countryThe country-specific part containing the bank/branch code and the account number

The length and internal layout of the BBAN part differ from country to country, so the total length of an IBAN also varies by country. Below are the total IBAN lengths for a few countries as examples:

  • TR (Türkiye) — 26 characters
  • DE (Germany) — 22 characters
  • GB (United Kingdom) — 22 characters
  • FR (France) — 27 characters
  • NL (Netherlands) — 18 characters
  • BE (Belgium) — 16 characters

This length is fixed and depends on the country code; if an IBAN's length differs from the value expected for its country, you can tell there is something wrong with the number even before checking the checksum.

The IBAN format in Türkiye

In Türkiye an IBAN is always 26 characters long and begins with the country code TR. The two digits following the first two letters are the check digits; the rest holds the identifier specific to the bank and the account. If an IBAN's length differs from the expected 26 characters — even when the check digits add up mathematically — you can tell there is something wrong with the number.

How the check digits are calculated: MOD 97-10

The check digits in an IBAN are calculated with the ISO 7064 MOD 97-10 algorithm. The steps are as follows:

  • The first 4 characters of the IBAN (country code + check digits) are moved to the end of the number.
  • Every letter in the resulting string is replaced with its numeric counterpart: A=10, B=11, ... Z=35.
  • The large multi-digit number that results, now consisting only of digits, is divided by 97.
  • If the remainder is 1, the IBAN is mathematically valid; any other remainder means there is an error in the number.

The reason letters are converted to numbers is simple: the check-digit calculation is a pure division and can only work with digits. Since the country code consists of two letters, those letters have to be included in the calculation somehow; the mapping A=10, B=11, ... Z=35 is the standard way of turning them into numbers that can be processed.

As an example, take the number TR33 0006 1005 1978 6457 8413 26 that this tool shows by default — a Turkish IBAN. When the first 4 characters (TR33) are moved to the end, the string becomes 0006100519786457841326TR33. When the letters are converted to numbers (T=29, R=27), the resulting number is 0006100519786457841326292733. Dividing that number by 97 leaves a remainder of 1; this IBAN is therefore valid as far as the check digits are concerned.

What it verifies, and what it does not

This check only shows that the number is formally consistent; an IBAN whose check digits add up does not mean it belongs to an account that actually exists or that it belongs to the right person. A checksum check does not query whether an account really exists at the bank — that can only be confirmed by the bank in question, through an actual transfer attempt or an account lookup system.

The real function of this check is to catch the typos users make when entering an IBAN by hand: errors such as transposed digits or a missing or extra character break the check digits and fail the checksum test. That is why adding live validation to the IBAN field on invoices, payroll records or payment forms catches a large share of user errors before the form is submitted.

There is one exception: some typos can coincidentally produce a valid checksum again. In that case the number looks “valid” mathematically but may in fact point to the wrong account. A checksum check should therefore be thought of not as a replacement for verifying the recipient's details, but only as a way of eliminating the first and most common class of error.

Common mistakes

  • Writing digits in the wrong order: swapping two neighbouring characters (a transposition) almost always breaks the checksum and is easily caught by this kind of check.
  • Missing or extra characters: skipping or repeating a character while copying and pasting invalidates both the length and the check digits.
  • Confusing checksum validity with account correctness: an IBAN being mathematically valid does not mean the account exists or that the recipient is the right person.
  • Ignoring the country-specific length: every country's IBAN length is fixed; a deviation from that length can show the number is wrong even when the checksum adds up.

You can use the tool below to check whether the check digits of an IBAN you have add up and whether its length matches its country. Validation runs entirely in your browser; no account data is stored or sent to a server.