Understanding the International Bank Account Number (IBAN)
The International Bank Account Number (IBAN) is an internationally agreed standard defined under ISO 13616. Originally created by the European Committee for Banking Standards to facilitate seamless cross-border payments across the European Union, the IBAN system has expanded globally to standardize electronic fund routing across more than 80 countries.
Software developers, quality assurance engineers, fintech product teams, and banking system integrators regularly require syntactically valid test IBANs to test payment gateways, validate account form inputs, and ensure error handling routines function correctly. Using real customer accounts in staging or automated test pipelines introduces severe security risks and regulatory compliance violations. This tool produces mathematically authentic, syntactically valid test IBANs for development and quality assurance without exposing sensitive financial records.
When reconciling electronic deposits against paper ledger entries, teams frequently pair synthetic testing with the checkbook balance calculator to balance deposits in transit. Similarly, for digital peer-to-peer and merchant disbursements, our cash app fee calculator estimates domestic transfer and instant cash-out costs. To systematically compare ledger balances against reported monthly bank statements, explore our bank reconciliation calculator.
Anatomy of an IBAN
An IBAN consists of up to 34 alphanumeric characters structured into three mandatory segments:
- Country Code (2 Letters): Represents the country where the bank account resides, formatted using the two-letter ISO 3166-1 alpha-2 standard (such as DE for Germany, FR for France, or GB for the United Kingdom).
- Check Digits (2 Numeric Digits): Positions 3 and 4 house two verification digits computed via the MOD-97-10 checksum algorithm (ISO/IEC 7064). These digits enable banking software to immediately catch typographical errors before submitting routing instructions.
- Basic Bank Account Number (BBAN, up to 30 characters): Contains domestic account routing details defined by each country's central monetary authority. The BBAN commonly includes a bank identifier, branch or sort code, and the individual account number.
The MOD-97-10 Checksum Algorithm
IBAN validation relies on the ISO/IEC 7064:2003 MOD-97-10 algorithm. This method detects nearly all single-character substitution errors, transposition errors (swapping adjacent digits), and length mismatches before funds leave an initiating account.
Generating Check Digits
When generating a new IBAN from a given country code and BBAN, the algorithm computes two check digits (represented as KK) such that:
Here, each alphabetic character in the country code (CC) and BBAN is transformed into a two-digit integer using the mapping A = 10, B = 11, ..., Z = 35. The resulting check digits are padded with a leading zero if smaller than 10, yielding a two-character numeric string from 02 to 98.
Validating an Existing IBAN
To verify an existing IBAN string, the algorithm rearranges the characters and checks for a remainder of 1:
- Strip all spaces, punctuation, and hyphens, and ensure the string conforms to the expected country length.
- Move the first four characters (the country code and two check digits) to the very end of the string.
- Convert all letters into two-digit integers (A = 10 through Z = 35). Numeric characters remain unchanged.
- Compute the remainder of the resulting large integer divided by 97.
If and only if the remainder is exactly 1, the check digits are mathematically valid.
Step-by-Step Worked Example
Consider the published standard German IBAN sample:
- Country Code: DE (2 letters, expected Germany length: 22 characters)
- Check Digits: 89
- BBAN: 370400440532013000 (8-digit Bankleitzahl 37040044 + 10-digit account 0532013000)
Step 1: Rearrange the characters. Move DE89 to the end of the BBAN:
Step 2: Convert letters to numbers. D becomes 13 and E becomes 14:
Step 3: Piecewise Modulo 97 Calculation. Because 24-digit integers exceed standard 32-bit integer limits, modern software computes remainder blocks sequentially:
- Block 1: 3704004 mod 97 = 72
- Block 2: 7240532 mod 97 = 19
- Block 3: 1901300 mod 97 = 23
- Block 4: 2301314 mod 97 = 84
- Block 5: 8489 mod 97 = 1
Because the final remainder equals 1, the IBAN satisfies the ISO 13616 verification standard.
Supported Country Formats & Lengths
Different nations employ specific BBAN formats and fixed overall character lengths. Here is an overview of major supported territories:
| Country | Code | Total Length | BBAN Architecture |
|---|---|---|---|
| Germany | DE | 22 chars | 8-digit BLZ + 10-digit Account |
| France | FR | 27 chars | 5-digit Bank + 5-digit Branch + 11-char Account + 2-digit Key |
| United Kingdom | GB | 22 chars | 4-letter Bank + 6-digit Sort Code + 8-digit Account |
| Spain | ES | 24 chars | 4-digit Bank + 4-digit Branch + 2-digit Key + 10-digit Account |
| Italy | IT | 27 chars | 1-letter Check + 5-digit ABI + 5-digit CAB + 12-char Account |
| Netherlands | NL | 18 chars | 4-letter Bank + 10-digit Account |
| Switzerland | CH | 21 chars | 5-digit Clearing + 12-digit Account |
| Norway | NO | 15 chars | 4-digit Bank + 6-digit Account + 1-digit Key |
Frequently asked questions
Can I use these generated IBANs to make or receive real financial payments?
Why do different countries have different IBAN lengths?
What is the purpose of MOD-97-10 validation?
How do electronic payment gateways use test IBANs?
Does the United States use IBAN numbers for domestic banking?
Resources and references
The formulas and methods in this calculator were checked against these independent sources.