IBAN - international standard for bank account number
Table of contents
In this article you can find an introduction to the new international
standard used to uniquely identify the account of a
customer at a financial institution, a validation algorithm with some
examples, an on-line
validation form and a program in
It is available also the version of the program
in PL/SQL di Oracle.
The article is useful for the programmers who must adapt
their information systems to this new standard. Comments
and questions are welcome: please reach me at
I thank Mr Wojciech Sosnowski (Poland) ans Mr Joassart Benoit (Luxembourg)
for valuable comments on the check digits.
Mr Alain Dumont (Belgium) has produced a
with a few improvements: the IBAN is introduced in block of 4 characters (paper format);
the validation is done for a list of countries.
What is the IBAN?
The IBAN (International Bank Account Number) is the
international standard used to uniquely identify the
account of a customer at a financial institution, proposed
by ECBS (European Committee for Banking Standards). This standard
allows, to the ordering bank or to the beneficiary’s
one, to verify the correctness of the data thanks to the
presence of the check digits. The IBAN has a length that
depends on the nation, with a maximum of 34 characters,
cannot contain neither spaces nor special characters, like
hyphen or slash, is composed of numbers and capital
letters, according to the following scheme:
||0 and 1
||2 and 3
|BBAN of the nation
||from 4 to the end
||letters and digits
Italian bank account number is made of 27 characters:
IT, two check digits and
The IBAN considerated up to now has
base format that is called like that to be
distinguished from the
paper format. The latter can
contain spaces to facilitate the spelling of the string,
IT60 Q012 3412 3450 0000 0753 XYZ.
The European Payments Council has issued a resolution according which from 1 January 2007,
foreign payments between the countries of the European Union and the European Economic Area
must use the payment recipient's IBAN and the recipient bank's BIC (Bank Identifier Code).
IBAN validation algorithm
The IBAN must have a minimum of 5 and a maximum of 34
It must only contain capital letters of the Latin
alphabet from A to Z and digits from 0 to 9. Moreover, in
positions 0 and 1 there must be only letters (a valid ISO
state code), while in positions 2 and 3 only numbers.
The first four characters of the original string are
swapped with the rest.
Every character is converted into a code from 0 to 35
according to the following rule. The digit is transformed
into the corresponding number, for example
7. The letter
A is converted into 10,
into 11, etc,
Z is converted into 35. The result
in a new string made of the numbers that have been
The new numerical string is interpreted now as a
number. Dividing that number by 97, the remainder 1 must
be obtained. In order to facilitate the division of the
excessive long numbers, it is possible to break the
numerical string into smaller parts, and calculate the
remainder of the division of the first part by 97, then
make the new numerical string of the remainder and of the
second part and calculate the remainder of the division
of this number by 97, etc.
Examples of IBAN validation
Let us consider the string
IT60Q0123412345000000753XYZ and follow the steps of
This is a string of 27 characters.
It contains only capital letters and digits. In
positions 0 and 1 there are letters IT, while in
positions 2 and 3 the number 60.
Exchanging the first four characters with the rest,
you obtain the string
Converting it into a numerical string,
changed into 26,
0 is changed into 0,
changed into 1, etc. The result is
Let us break this numerical string into five parts:
0. The remainder of the
division of 26012341 by 97 is 45. The remainder of the
division of 4523450000 by 97 is 15. The
remainder of the division of 1500753333
by 97 is 82. The remainder of the division of
8243518296 by 97 is 68. The remainder of
the division of 680 by 97 is 1.
Therefore the remainder of the division is 1.
This IBAN is valid.
Let us consider
IT60 Q012 3412 3450 0000 0753
XYZ. Being in the paper format, this string contains
some spaces, therefore the IBAN is invalid.
IT60Q012341234500000753/XYZ contains a
/, therefore the IBAN is
Let us consider the string
IT63Q0123412345000000753XYZ. This example is
identical to the first one, except for the check digits 63.
The numerical string is
260123412345000000753333435182963. The remainder of
the division of this number by 97 is 4. Therefore the IBAN
IBAN validating program
Here you can find a validating
form and an example of the
program implementing the algorithm checking international bank
IBAN validating form
To verify a bank account number, inserted it in the
following field and click on the button
- IBAN in the site of di European Committee for Banking Standards.