International Bank Account Number


The International Bank Account Number is an internationally agreed upon system of identifying bank accounts across national borders to facilitate the communication and processing of cross border transactions with a reduced risk of transcription errors. An IBAN uniquely identifies the account of a customer at a financial institution. It was originally adopted by the European Committee for Banking Standards and since 1997 as the international standard ISO 13616 under the International Organization for Standardization. The current version is ISO 13616:2020, which indicates the Society for Worldwide Interbank Financial Telecommunication as the formal registrar. Initially developed to facilitate payments within the European Union, it has been implemented by most European countries and numerous countries in other parts of the world, mainly in the Middle East and the Caribbean. By December 2024, 89 countries were using the IBAN numbering system.
The IBAN consists of up to 34 alphanumeric characters comprising a country code; two check digits; and a number that includes the domestic bank account number, branch identifier, an

Background

Before IBAN, differing national standards for bank account identification were confusing for some users. This often led to necessary routing information being missing from payments. Routing information as specified by ISO 9362 does not require a specific format for the transaction so the identification of accounts and transaction types is left to agreements of the transaction partners. It also does not contain check digits, so errors of transcription were not detectable and it was not possible for a sending bank to validate the routing information prior to submitting the payment. Routing errors caused delayed payments and incurred extra costs to the sending and receiving banks and often to intermediate routing banks.
In 1997, to overcome these difficulties, the International Organization for Standardization published ISO 13616:1997. This proposal had a degree of flexibility that the European Committee for Banking Standards believed would make it unworkable, and they produced a "slimmed down" version of the standard which, amongst other things, permitted only upper-case letters and required that the IBAN for each country have a fixed length. ISO 13616:1997 was subsequently withdrawn and replaced by ISO 13616:2003. The standard was revised again in 2007 when it was split into two parts. ISO 13616-1:2007 "specifies the elements of an international bank account number used to facilitate the processing of data internationally in data interchange, in financial environments as well as within and between other industries" but "does not specify internal procedures, file organization techniques, storage media, languages, etc. to be used in its implementation". ISO 13616-2:2007 describes "the Registration Authority responsible for the registry of IBAN formats that are compliant with ISO 13616-1 the procedures for registering ISO 13616-compliant IBAN formats". The official IBAN registrar under ISO 13616-2:2007 is SWIFT.
IBAN imposes a flexible but regular format sufficient for account identification and contains validation information to avoid errors in transcription. It carries all the routing information needed to get a payment from one bank to another wherever it may be; it contains key bank account details such as country code, branch codes and account numbers, and it contains check digits which can be validated at the source according to a single standard procedure.

Structure

The IBAN consists of up to 34 alphanumeric characters, as follows:
  • country code using ISO 3166-1 alpha-2 – two letters,
  • check digits – two digits, and
  • Basic Bank Account Number – up to 30 alphanumeric characters that are country-specific.
The check digits represent the checksum of the bank account number which is used by banking systems to confirm that the number contains no simple errors.
In order to facilitate reading by humans, IBANs are traditionally expressed in groups of four characters separated by spaces, the last group being of variable length as shown in the example below; when transmitted electronically however spaces are omitted. Current exceptions to this formatting are Burundi, Egypt, Libya, and El Salvador.
Permitted IBAN characters are the digits 0 to 9 and the 26 Latin alphabetic characters A to Z. This applies even in countries where these characters are not used in the national language.

Basic Bank Account Number

The Basic Bank Account Number format is decided by the national central bank or designated payment authority of each country. There is no consistency between the formats adopted. The national authority may register its BBAN format with SWIFT but is not obliged to do so. It may adopt IBAN without registration. SWIFT also acts as the registration authority for the SWIFT system, which is used by most countries that have not adopted IBAN. A major difference between the two systems is that under SWIFT there is no requirement that BBANs used within a country be of a pre-defined length.
The BBAN must be of a fixed length for the country and comprise case-insensitive alphanumeric characters. It includes the domestic bank account number, branch identifier, and potential routing information. Each country can have a different national routing/account numbering system, up to a maximum of 30 alphanumeric characters.

Check digits

The check digits enable the sending bank to perform a sanity check of the routing destination and account number from a single string of data at the time of data entry. This check is guaranteed to detect any instances where a single character has been omitted, duplicated, mistyped or where two characters have been transposed.

Processing

One of the design aims of the IBAN was to enable as much validation as possible to be done at the point of data entry. In particular, the computer program that accepts an IBAN will be able to validate:
  • Country code
  • Number of characters in the IBAN correspond to the number specified for the country code
  • BBAN format specified for the country code
  • Account number, bank code and country code combination is compatible with the check digits
The check digits are calculated using MOD-97-10 as per ISO/IEC 7064:2003, which specifies a set of check character systems capable of protecting strings against errors which occur when people copy or key data. In particular, the standard states that the following can be detected:
  • All single substitution errors
  • All or nearly all single transposition errors
  • All or nearly all shift errors
  • High proportion of double substitution errors
  • High proportion of all other errors
The underlying rules for IBANs is that the account-servicing financial institution should issue an IBAN, as there are a number of areas where different IBANs could be generated from the same account and branch numbers that would satisfy the generic IBAN validation rules. In particular cases where 00 is a valid check digit, 97 will not be a valid check digit, likewise, if 01 is a valid check digit, 98 will not be a valid check digit, similarly with 02 and 99.
The UN CEFACT TBG5 has published a free IBAN validation service in 32 languages for all 57 countries that have adopted the IBAN standard. They have also published the JavaScript source code of the verification algorithm.
An English language IBAN checker for ECBS member country bank accounts is available on its website.

Algorithms

Validating the IBAN

An IBAN is validated by converting it into an integer and performing a basic mod-97 operation on it. If the IBAN is valid, the remainder equals 1. The algorithm of IBAN validation is as follows:
  1. Check that the total IBAN length is correct as per the country. If not, the IBAN is invalid
  2. Move the four initial characters to the end of the string
  3. Replace each letter in the string with two digits, thereby expanding the string, where A = 10, B = 11,..., Z = 35
  4. Interpret the string as a decimal integer and compute the remainder of that number on division by 97
If the remainder is 1, the check digit test is passed and the IBAN might be valid.
Example :

Generating IBAN check digits

According to the ECBS "generation of the IBAN shall be the exclusive responsibility of the bank/branch servicing the account". The ECBS document replicates part of the ISO/IEC 7064:2003 standard as a method for generating check digits in the range 02 to 98. Check digits in the ranges 00 to 96, 01 to 97, and 03 to 99 will also provide validation of an IBAN, but the standard is silent as to whether or not these ranges may be used.
The preferred algorithm is:
  1. Check that the total IBAN length is correct as per the country. If not, the IBAN is invalid.
  2. Replace the two check digits by 00.
  3. Move the four initial characters to the end of the string.
  4. Replace the letters in the string with digits, expanding the string as necessary, such that 'A' or 'a' = 10, 'B' or 'b' = 11, and 'Z' or 'z' = 35. Each alphabetic character is therefore replaced by 2 digits. Technically, this is ASCII value of the corresponding uppercase letter decreased by 55. The code of 'A' = 41 = 65 in ASCII, up to 'Z' = 5A = 90, this gives you rule of ASCII value of the letter −55.
  5. Convert the string to an integer.
  6. Calculate mod-97 of the new number, which results in the remainder.
  7. Subtract the remainder from 98 and use the result for the two check digits. If the result is a single-digit number, pad it with a leading 0 to make a two-digit number.

    Modulo operation on IBAN

Any computer programming language or software package that is used to compute D mod 97 directly must have the ability to handle integers of more than 60 digits. In practice, this can only be done by software that either supports arbitrary-precision arithmetic or that can handle 219-bit integers, features that are often not standard. If the application software in use does not provide the ability to handle integers of this size, the modulo operation can be performed in a piece-wise manner.
Piece-wise calculation can be done in many ways. One such way is as follows:
  1. Starting from the leftmost digit of D, construct a number using the first 9 digits and call it N.
  2. Calculate N mod 97.
  3. Construct a new 9-digit N by concatenating the above result with the next 7 or 8 digits of D. If there are fewer than 7 digits remaining in D but at least one, then construct a new N, which will have less than 9 digits, from the above result followed by the remaining digits of D
  4. Repeat steps 2–3 until all the digits of D have been processed
The result of the final calculation in step 2 will be D mod 97 = N mod 97.