You are currently:  Home » Iban Algorithm

IBAN Algorithm

To correctly validate an IBAN the following method is used.

DE89 3704 0044 0532 0130 00

The IBAN can be broken down into its constituent parts:

Country code: DE
Control Digit: 89
Bank code: 37040044
Account number: 0532 0130 00
Total length of IBAN for Germany: 22 an

Step 1:

All spaces are stripped out to make an electronic format IBAN. The length of an IBAN varies from country to country and it is important that the most current country rules are followed. In this case we are using a German IBAN which is 22 characters long.

The IBAN will look like this

DE89370400440532013000

Step 2:

Detach the first 4 characters (ISO country code & control digit) from IBAN and attach them at the end.

370400440532013000DE89

Step 3:

Eliminate all those alpha characters by converting each of them to numbers using the table below

The IBAN will now become:

370400440532013000131489

Step 4:

Perform a modulus operation with 97

370400440532013000131489 mod 97 which gives 1

The result from the calculated modulus 97 will always be 1 if the IBAN number is valid.

WARNING!
DO NOT attempt to generate or compute your own IBAN number or using any third party tools. Only your bank can provide you with your IBAN number. If you use an incorrect IBAN then either the payment will be rejected or you will be charged for the failed or repaired payment.

The algorithm published is aimed only for better understanding of IBAN and does not guarantee a true and accurate IBAN number.