Introduction
Typing a wrong digit in an international bank transfer can send money to the wrong account, and the bank may charge you a fee for the reversal. The International Bank Account Number (IBAN) was created to prevent this. It wraps a country code, two check digits, and a national bank account number into a single string that you can validate mathematically before any money moves. This IBAN validator checks the structure, length, and mod-97 checksum in your browser, showing each step of the computation. Paste an IBAN above and the result appears immediately. Nothing is sent to a server.
What this tool does
- Validates IBANs per ISO 13616 by checking three layers: structural format (2-letter country code + 2 check digits + BBAN), country-specific length, and the mod-97 checksum.
- Supports length validation for over 70 countries using the official SWIFT IBAN Registry length table, from Norway (15 characters) to Saint Lucia (32 characters).
- Shows the step-by-step mod-97 computation: normalization, country code extraction, rearrangement (first 4 chars moved to end), letter-to-number conversion (A=10 through Z=35), and the final modulo result.
- Reports the country code, check digits, and BBAN (Basic Bank Account Number) as separate fields so you can inspect each component.
- Accepts IBANs with or without spaces, which is how most banks display them in statements and online banking interfaces.
- Runs entirely client-side using BigInt arithmetic, so the full numeric string (which can exceed 30 digits) is computed without floating-point precision loss.
How this tool works
Type or paste an IBAN into the input field. The tool normalizes it by uppercasing and stripping all spaces. It then checks the structure against the pattern: two letters, two digits, followed by the BBAN (which is alphanumeric and varies in length by country).
Next, it looks up the country code in a length table. Each country has a fixed IBAN length defined by the SWIFT IBAN Registry. If the input length does not match the expected length for that country, the tool reports the mismatch with both the expected and actual values.
For the checksum, the tool performs the mod-97 algorithm. It moves the first four characters (country code and check digits) to the end of the string, converts every letter to a number (A=10, B=11, ..., Z=35), and treats the result as a single large integer. It computes that integer modulo 97 using JavaScript BigInt, which handles the 30+ digit numbers without precision loss. If the remainder is 1, the checksum is valid. The settings panel shows each step of this computation so you can follow the math.
If any of the three checks (structure, length, checksum) fail, the tool lists the specific errors. A valid IBAN must pass all three.
How IBAN validation works (ISO 13616)
The IBAN standard is defined in ISO 13616:2020, which specifies the structure and the mod-97 checksum algorithm. The format was introduced in 1997 by the European Committee for Banking Standards (ECBS) and is now used in over 80 countries. The SWIFT IBAN Registry is the authoritative source for country-specific lengths and BBAN structures, maintained by SWIFT as the registration authority for ISO 13616.
An IBAN consists of three parts. The country code (2 letters) uses ISO 3166-1 alpha-2 codes. The check digits (2 digits) are computed using the mod-97 algorithm to detect transcription errors. The BBAN (Basic Bank Account Number) is the national account identifier, whose internal structure varies by country. For example, a German IBAN (22 characters) encodes a bank code (8 digits) and an account number (10 digits) in the BBAN, while a French IBAN (27 characters) encodes a bank code (5 digits), a branch code (5 digits), an account number (11 characters), and a national check digit.
The mod-97 algorithm works by rearranging the IBAN so the country code and check digits move to the end, converting letters to their numeric values (A=10, B=11, ..., Z=35), and computing the resulting large integer modulo 97. A valid IBAN produces a remainder of 1. This algorithm catches all single-digit substitutions and most transpositions, making it effective for the manual entry scenarios that cause most transfer errors. The same principle of a modular checksum over a structured identifier is used in the VIN Decoder for vehicle identification numbers.
Within the Eurozone, IBANs are a legal requirement for SEPA (Single Euro Payments Area) credit transfers, as specified in ECB SEPA requirements. The Base58Check Encoder uses a different checksum (double SHA-256) for the same purpose in cryptocurrency addresses.
How to use this tool
- Paste an IBAN into the input field. Spaces are stripped automatically and letters are uppercased. You can paste the formatted version from a bank statement (e.g. `GB82 WEST 1234 5698 7654 32`) or the compact version without spaces.
- Check the Valid indicator. If the IBAN is invalid, the tool lists specific errors such as structure mismatch, length mismatch, or checksum failure.
- Review the country code, check digits, and BBAN in the settings panel to confirm each component.
- Expand the checksum computation panel to see the rearranged string, the letter-to-number conversion, and the final mod-97 result. A valid IBAN shows remainder 1.
- If the country code is unknown (not in the SWIFT IBAN Registry), the tool reports it as an unknown country and cannot validate the length.
Real-world examples
Validating a German IBAN before a SEPA transfer
Input: `DE89 3704 0044 0532 0130 00`. The tool strips spaces, identifies country code `DE` (expected length 22), and confirms the input is 22 characters. It rearranges to `370400440532013000DE89`, converts `DE` to `1314` (D=13, E=14), producing `370400440532013000131489`. The mod-97 result is 1, so the IBAN is valid. The BBAN `370400440532013000` contains the German bank code (37040044, Commerzbank Frankfurt) and account number (0532013000).
Catching a typo in a British IBAN
Input: `GB82 WEST 1234 5698 7654 31` (last two digits changed from `32` to `31`). The tool normalizes to `GB82WEST12345698765431`, confirms the length is 22 (correct for GB), and runs the mod-97 computation. The remainder is not 1, so the tool reports "Checksum invalid: mod 97 result is not 1." This catches the single-digit error before the transfer is submitted, saving the sender a failed-payment fee.
Detecting an unknown country code
Input: `XX12 ABCD 1234 5678 90`. The tool identifies country code `XX`, which is not in the IBAN length table because no country uses that code for IBANs. It reports "Unknown country code XX" and cannot validate the length. This catches cases where someone pastes a domestic account number or a non-IBAN identifier by mistake.
Validating a long Saint Lucia IBAN
Input: `LC55 HEMM 0001 0001 0020 0120 1202 0015`. The tool identifies country code `LC` (Saint Lucia, expected length 32), confirms the input is 32 characters, and runs the mod-97 computation on the full 32-character rearranged string. Because the numeric string exceeds 30 digits, BigInt arithmetic is used to avoid floating-point precision loss. The remainder is 1, confirming validity.
Comparison with similar methods
| Method | Complexity | Typical use |
|---|---|---|
| IBAN (ISO 13616) | 15-32 chars, mod-97 checksum, country-specific BBAN | International bank transfers, SEPA payments |
| VIN (ISO 3779) | 17 chars, mod-11 check digit, 3 sections | Vehicle identification and registration |
| Base58Check (Bitcoin) | 26-35 chars, double SHA-256 checksum | Cryptocurrency address validation |
| ISBN-13 | 13 digits, mod-10 check digit | Book identification in publishing |
| Luhn (credit cards) | 13-19 digits, mod-10 Luhn algorithm | Payment card number validation |
Limitations or considerations
This tool validates the IBAN format, length, and checksum per ISO 13616. It does not verify that the bank account exists, that the account is active, or that the account holder name matches. A valid IBAN can still belong to a closed account. For actual payment verification, banks use the IBAN in a name-checking service during the transfer initiation process.
The country length table covers the IBAN formats registered with SWIFT. If a country has recently introduced IBANs and is not yet in the registry, the tool will report an unknown country code. The BBAN structure within each country (bank code, branch code, account number) is not decoded, because those structures vary by country and are defined in national standards rather than ISO 13616 itself.
The mod-97 checksum catches all single-digit substitutions and most transpositions, but it does not catch all possible errors. For example, swapping two identical digits produces no change in the checksum. The algorithm is designed for human transcription errors, not for adversarial tampering. For a checksum designed to resist intentional modification, see the Base58Check Encoder, which uses a double SHA-256 hash.
Frequently asked questions
What is the mod-97 algorithm and why does the result need to be 1?
The mod-97 algorithm rearranges the IBAN by moving the first four characters (country code and check digits) to the end, converts all letters to numbers (A=10 through Z=35), and computes the resulting large integer modulo 97. The check digits are chosen so that this remainder equals 1. If the remainder is anything other than 1, the IBAN contains a transcription error.
Why are letters converted to numbers (A=10, B=11, ..., Z=35)?
The IBAN format allows letters in the BBAN for some countries (like the UK, which uses sort codes with letters in some formats). To compute a single numeric checksum, the mod-97 algorithm needs every character as a number. The mapping A=10 through Z=35 is defined in ISO 13616 and gives each letter a unique two-digit numeric value.
Does a valid IBAN guarantee the bank account exists?
No. A valid IBAN only confirms the format, length, and checksum are correct. The account could be closed, the holder name could be different, or the bank code could be wrong while still producing a valid checksum. Banks perform additional verification (name matching, account status) during the actual transfer process.
What is the difference between an IBAN and a SWIFT/BIC code?
An IBAN identifies a specific bank account. A SWIFT/BIC code identifies the bank itself. An international transfer typically requires both: the IBAN tells the receiving bank which account to credit, and the BIC tells the sending bank which institution to route to. The IBAN checksum validates the account number; the BIC has no checksum.
Why does the tool use BigInt for the mod-97 computation?
IBANs can produce numeric strings exceeding 30 digits after letter conversion. JavaScript's standard Number type uses 64-bit floating-point, which loses integer precision above 2^53 (about 16 digits). BigInt handles arbitrarily large integers, so the mod-97 computation is exact regardless of IBAN length.
Conclusion
IBAN validation is the first line of defense against misdirected international payments. The mod-97 checksum catches the transcription errors that cause most failed transfers, and the country-specific length check catches format mistakes before they reach the banking network. This validator shows each step of the computation so you can understand why an IBAN passes or fails. For other identifier validation tools, see the VIN Decoder for vehicle identification numbers or the Base58Check Encoder for cryptocurrency address checksums.