Tool to check IBAN numbers. The IBAN (International Bank Account Number) algorithm allows checking if an IBAN number is correct.
IBAN Number - dCode
Tag(s) : Checksum
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
IBAN, or International Bank Account Number, is an international bank account number used to uniquely identify a bank account worldwide.
IBAN facilitates cross-border financial transactions and reduces the risk of errors in processing international payments.
An IBAN number is made up of a series of letters and numbers (minimum 14 to maximum 34 characters depending on the country) described in the ISO13616 standard.
It begins with 2 letters indicating the country code of the bank account, followed by the IBAN checksum (between 02 and 98) and 10 to 30 characters depending on the country which correspond to bank codes including the bank account number.
An IBAN is validated by 5 independent tests (ISO-13616 norm, SWIFT registry of 89 countries). The result of each test is displayed with a checked (passed) or unchecked (failed) box.
Before any test, the IBAN is normalized: spaces and separators are removed and lowercase letters are converted to uppercase.
Example: fr14 2004 1010 0505 0001 3m02 606 becomes FR1420041010050500013M02606
— Country: the first 2 letters must be a country code from the IBAN registry.
Example: FR for France, DE for Germany, BE for Belgium, and so on. The United States (US) does not use IBAN, so US is rejected.
— Size: the total length must match the one defined for the country.
Example: France has 27 characters, Germany 22, Norway 15 (the shortest), Russia 33. A French IBAN missing one digit (26 characters) is rejected without any computation.
— Fixed check (only for some countries): in 9 countries (BA, ME, MK, MR, PT, RS, SI, TL, TN), the IBAN key has an imposed value (for example 50 for Portugal, 56 for Slovenia), because the account number already carries its own national check digits computed with modulo 97.
Example: PT50 0002 0123 1234 5678 9015 4: the key must be 50. A Portuguese IBAN with any other key is rejected, even if its modulo 97 calculation is consistent, because this means the national check digits of the account are wrong.
— BBAN format: after the country code and the key, the remainder of the IBAN (the BBAN, the national account number) must follow the country's format, made of digits (n), letters (a) or alphanumeric characters (c).
Example: France: 10 digits (bank and branch), 11 alphanumeric characters (account), 2 digits (RIB key).
Example: United Kingdom: 4 letters (bank) followed by 14 digits. GB29 1234 6016 1331 9268 19 has the right length (22), but is rejected because the BBAN starts with digits instead of 4 letters.
— Check digits: this is the modulo 97 calculation below.
a) Move the 4 first characters (country code and key) to the end of the IBAN, replacing the key with 00.
Example: IBAN FR14 2004 1010 0505 0001 3M02 606
becomes 20041010050500013M02606 FR00
b) Replace each letter by its rank in the alphabet + 9. So A=10, B=11, C=12, etc. Z=35. Letters can appear in the country code as well as in the account number.
Example: M=22, F=15, R=27, the IBAN becomes 200410100505000132202606152700
c) Calculate the value of this big number modulo 97, then subtract the result from 98 to get the check key. The number exceeds the capacity of ordinary integers, so pay attention to process it in chunks or with a big number library.
Example: 200410100505000132202606152700 mod 97 = 84 and 98-84 = 14. The checksum key is 14.
d) Check that the 2 characters after the country code are this key. Here, FR14: the IBAN passes validation.
Example: A typing error almost always changes the result: FR14 2004 1010 0505 0001 3M02 660 (two digits swapped) gives another key, so the IBAN is rejected.
Validation guarantees that an IBAN is well formed, not that it exists. Verifying the existence of the bank code and the account requires adequate databases (and the bank's agreement).
The corresponding regular expression (which is not sufficient), applied to the normalized IBAN, is: ^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$
The IBAN is generally present on bank identity statements (RIB), but also often on checkbooks or other bank statements.
It is important to note that the IBAN is specific to each bank account, several accounts therefore mean several distinct IBANs.
The IBAN number is used for SEPA mandates (Austria, Belgium, Cyprus, Estonia, Finland, France, Germany, Greece, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Portugal, Slovakia, Slovenia, Spain).
The IBAN identifies a specific bank account, while the BIC (Bank Identifier Code) or SWIFT (Society for Worldwide Interbank Financial Telecommunication) is used to identify the bank itself.
It is common for the two to be used together.
No, the first 2 letters indicate the country, immediately foreign IBANs are distinct and recognizable.
Sometimes it is asked to concatenate both IBAN and BIC codes (IBAN+BIC or BIC+IBAN).
The IBAN is not considered highly confidential information, as it is necessary to receive transfers.
However, avoid sharing it unnecessarily and remain vigilant against phishing or scam attempts.
A possible source code for programming the checksum calculation is // Pseudo code
function calculateIBANChecksum(iban) {
rearrangedIBAN = iban[4..] + iban[0..1] + "00"
numericIBAN = ""
for each character in rearrangedIBAN {
if (character is a letter) numericIBAN += ASCII code of (character) - 55
else numericIBAN += character
}
checksum = 98 - (numericIBAN % 97)
return checksum
}
dCode retains ownership of the "IBAN Number" source code. Any algorithm for the "IBAN Number" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "IBAN Number" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "IBAN Number" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "IBAN Number" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: IBAN Number on dCode.fr [online website], retrieved on 2026-11-12,