This document describe bank account validation rules for following countries:
Document extracted from www.credit-card.be

 

(BE) Belgium account validation

The Belgium account format is XXX-YYYYYYY-ZZ

XXX = A number that give the bank code.

YYYYYYY = A number that give the account number.

ZZ = check digit. It's the rest of the division of XXXYYYYYYY by 97.

 
Check

(CH) Switzerland account validation

No specific validation is made.

In Switzerland, each bank can have its own validation method.

 

(DE) Germany account validation

There is no specific validation except a format validation.

The account can be any where in the account field. To find the account in the field, we use the first word that start with a digit.

The format is XXXXXX-YY-ZZZZZZZZZZZZZ

XXXXXX = 6 digits.

YY = 2 digits.

ZZ..ZZ = 2 to 13 digits.

 
Check

 

(DK) Denmark account validation

There is no specific validation except a format validation.

The account can be any where in the account field. To find the account in the field, we use the first word that start with a digit.

The format is XXXX-Y...Y )

XXXX = The register number in 4 digits.

Y..Y = 1 to n digits.

 
Check

 

(FR) French account validation

In french there are several account type.

You have the RIB account that is the "Releve d'Identite Bancaire".

You have the SIREN account that is the "Systeme d'Identification et de Repertoire des Entreprises au niveau National".

These both account type start with a number. For particular case, it's possible to put the account number any where in the account field.

The rule to detect the account number is defined as follow.

The account number is any words that start with a digit. For example you can give "CPP XXXXX-YYYYY-ZZZZZZZZZZZ-RR TO SEE" where the first X must be a digit.

To know the account type, we using the account length.

The RIB account can have a length between 16 and 26.

The SIREN account must have a length of 9.

(FR) French account RIB validation

The RIB is the "Releve d'Identite Bancaire".

The format is XXXXX-YYYYY-ZZZZZZZZZZZ-RR where

XXXXX = A number in 5 digits that gives a bank code.

YYYYY = A number in 5 digits that gives a "code guichet".

ZZZZZZZZZZZ = A string of 1 to 11 positions that gives the account number. The account can have digits or letters. When a letter is present, it's replace by its EBCDIC equivalent.

A, J = 1

B, K, S = 2

C, L, T = 3

D, M, U = 4

E, N, V = 5

F, O, W = 6

G, P, X = 7

H, Q, Y = 8

I, R, Z = 9

RR = A number that gives the check digit.

Validation:

-----------

The rule used to valid the account is defined as follow:

First we replace the letter in account number (Z) by their digit equivalent.

After we adding missing zero to the left of the account (Z) to give it a length of 11 positions.

Once the account is built, we concatenate all four parts to give a number of 23 positions.

An account is valid when the rest of the division XXXXXYYYYYZZZZZZZZZZZRR by 97 is zero.

 
Check

 

(FR) French account SIREN validation

The SIREN account is the "Systeme d'Identification et de Repertoire des Entreprises au niveau National". This account number is attributed by the French bank and is mandatory when the amount is greater than 100.000 FRF.

The format is XXXXXXXXX where

XXXXXXXXX = A number in 9 digits.

Validation:

-----------

A 9 digits number computed as follow:

- Multiply the odd digit by 1

- Multiply the event digit by 2

- Add the digit obtain for the number greater than 10 to give only one digit (14 give 1+4 = 5).

- The sum must be a multiple of 10

Example:

--------

7 7 5 6 7 0 5 9 9

X 1 2 1 2 1 2 1 2 1

----------------------------------------

( 7 + 14 + 5 + 12 + 7 + 0 + 5 + 18 + 9 )

= 7 + 5 + 5 + 3 + 7 + 0 + 5 + 9 + 9 = 50

 

(GB) United kingdom account validation

There is no specific validation except a format validation.

The account can be any where in the account field. To find the account in the field, we use the first word that start with a digit.

The format is XXXX-YY-ZZZZZZZZZZ or XX-XX-YY-ZZZZZZZZZZ

XXXX = 4 digits that can be splited into 2 fields to 2 digits.

YY = 2 digits.

Z..Z = 1 to 10 digits.

 

(IE) Ireland account validation

See (GB) United Kingdom.

 

(IT) Italy account validation

There is no specific validation except a format validation.

The account can be any where in the account field. To find the account in the field, we use the first word that start with a digit.

The format is WWWW-0-YYYY-ZZZZZZZZ

WWWW = 4 digits. (A.B.I Code)

X = 1 digit. Must be zero.

YYYY = 4 digits. Agency code. (C.A.B)

Z..Z = 1 to 8 digits. Account number.

 

(NL) Nederland account validation

In Nederland there are two kind of account.

There is the post account and the commercial bank account.

The post account has the format XXXXX-Y-Z and the commercial bank account have the format XXXXXX-YYY.

In both case, the account number can be any where in the account field. The account is identified by its first character that must be a digit.

To choose the validation method, we use the account length.

The post account has a length of 9 and the commercial bank account a length of 10.

 

(NL) Nederland account post validation

Only a format validation is made.

The format is XXXXX-Y-Z where X, Y, Z must be a digit.

 

(NL) Nederland account commercial validation

The format is XXXXXX-YYY.

Validation:

-----------

First we concatenate the X and Y to give a number in 9 positions.

We making the sum of each digit multiply by a number that start at 9 to 1

The account is valid when the rest of the division of the sum by 11 is zero.

For example let's take the 762536-454

7 6 2 5 3 6 4 5 4

X 9 8 7 6 5 4 3 2 1

------------------------------------------

63 + 48 + 14 + 30 + 15 + 24 + 12 + 10 + 4 = 220

220 : 11 = 20 rest 0

 
Check

 

(SE) Sweden account validation

In Sweden there are two kind of account.

There is the "Banque d'epargne" account and the other bank account.

The "Banque d'epargne" account is a number in 10 positions and the other bank account have the format WWWW-XX-YYYY-Z.

In both can, the account number can be any where in the account field. The account is identified by its first character that must be a digit.

To choose the validation method, we use the account length.

The "Banque d'epargne" account has a length of 10 and the other bank account a length of 14.

 

(SE) Sweden "Banque d'epargne" account validation

There is no validation made.

(SE) Sweden other account validation

The format is WWWW-XX-YYYY-Z.

Validation:

-----------

First we concatenate the X and Y to give a number in 11 positions.

We making the sum of each digit multiply by a number that start at 11 to 1

The account is valid when the rest of the division of the sum by 11 is zero.

For example let's take the 1234-12-1234-4

1 2 3 4 1 2 1 2 3 4 4

X 11 10 9 8 7 6 5 4 3 2 1

----------------------------------------------

11 + 20 + 27 + 32 + 7 + 12 + 5 + 8 + 9 + 8 + 4 = 143

143 : 11 = 13 rest 0

 
Check

 


IBAN

Format are:

Country Length Examples of paper representation
Austria 20 AT61 1904 3002 3457 3201
Belgium 16 BE62 5100 0754 7061
Denmark 18 DK50 0040 0440 1162 43
Finland 18 FI21 1234 5600 0007 85
France 27 FR14 2004 1010 0505 0001 3M02 606
FR + IBAN Check Digit + RIB
FR 76 30003 00080 0002018737044
Check Digit = 76 When RIB has only digits
Germany 22 DE89 3704 0044 0532 0130 00
Greece 27 GR16 0110 1250 0000 0001 2300 695
Iceland 26 IS14 0159 2600 7654 5510 7303 39
Ireland 22 IE29 AIBK 9311 5212 3456 78
Italy 27 IT40 S054 2811 1010 0000 0123 456
Luxembourg 20 LU28 0019 4006 4475 0000
Netherlands 18 NL91 ABNA 0417 1643 00
Norway 15 NO93 8601 1117 947
Poland 28 PL27 1140 2004 0000 3002 0135 5387
Portugal 25 PT50 0002 0123 1234 5678 9015 4
Spain 24 ES91 2100 0418 4502 0005 1332
Sweden 24 SE35 5000 0000 0549 1000 0003
Switzerland 21 CH93 0076 2011 6238 5295 7
United Kingdom 22 GB29 NWBK 6016 1331 9268 19
GB + IBAN Check Digit + BIC4 + Sort Code + Account

 
Check