IBAN Verification


UK financial institutions will receive cross-border payment instructions from their customers quoting IBANs of foreign trading partners as destination accounts, these IBANs will have been generated by foreign banks.

The standard expects that the all IBANs will be verified on capture of the IBAN, that is, at the initial point of entry when it is entered into the UK banking system as the destination account. The purpose of this part of the standard is to describe the verification process, which is independent of the IBAN format or origin.



Validation Procedure

The IBAN is offered in all printed forms in sets of four alphabetic characters/numeric digits and might be around 34 characters/numbers in length, preceded by the term IBAN and divided by spaces as follows:

IBAN CCDD ZZZZ ZZZZ ZZZZ ZZZZ

C signifies the country code, D the check digits and Z the BBAN (standard bank account number) in the form acceptable to the country of issue. Z is used here as a foreign bank account number could be of any format.
It ought to be pointed out that the BBAN may consist of alphabetic figures along with numeric digits, and that it will inform between various regions. The validation is executed in precisely the same way regardless of the distinct formats of the BBAN. It is thus unnecessary to understand, or to refer to paperwork of the bank account number set ups of other countries.



Verification should be done with the following procedures:
- discard the prefix IBAN if found
- move the two alphabetic character country code and check digit pair from the front of the IBAN to back ( I.e. it turns ZZZZ ZZZZ ZZZZ ZZZZ CCDD )
- convert any specific alphabetic characters to numeric digits based on the standard table
- divide by 97

If the answer is 1, then the IBAN is valid.



Example Verification of an IBAN
The following picture shows an IBAN in the form in which it would appear on paper. The example is a Belgian account, quoted as a destination account for a cross border payment

BE88 3200 3471 3441

GB26MIDL40051512345674 Validation of the IBAN is carried out in the following way The letters IBAN and any spaces are ignored. The country code and the check digit pair (i.e. the first four alphabetic characters/numeric digits) are then moved to the right hand end. The example would now look like this:

320034713441BE88
MIDL40051512345674GB26 According to the following table the alphabetic characters are now replaced by numeric digits:

Converting characters into numbers
A B C D E F G H I J K L M
10 11 12 13 14 15 16 17 18 19 20 21 22

N O P Q R S T U V W X Y Z
23 24 25 26 27 28 29 30 31 32 33 34 35
The example IBAN would now look like this:

320 034 713 441 111 488

221 813 214 005 151 234 567 416 1126 This is then divided by 97. If the remainder is 1, the IBAN is valid, as the country and domestic part tally with the check digit pair. In the example, the result of division is 1 and the IBAN can therefore be accepted.

Practical Aspects of Verification

For reasons of precision, the use of integers instead of floating point numbers is recommended. If the number is too long for the software implementation of integers (a (signed) integer of 32 bits or 64 bits represents a maximum of 9 or 18 digits), then the calculation can be split up into consecutive remainder calculations on integers with a maximum length of 9 or 18 digits.

The following example shows the required steps:

1. The remainder of the division of 510007547061111462 by 97 = 1.
2. Calculate the modulo 97 of the first 9 digits of the number.
3. modulo 97 of 510007547 = 74.
4. Construct the next integer of 9 digits from the remainder followed by the next 7 or 8 digits of the number. Calculate the modulo 97.
5. modulo 97 of 740611114 = 12.
6. Repeat step 4-5 until all the digits of the number have been processed.
7. modulo 97 of 1262 = 1.