How to Validate an IBAN: Complete Verification Guide
Updated March 2026 — IBAN structure, check digit algorithm and how to avoid payment errors
1. What is an IBAN and why it matters
An IBAN (International Bank Account Number) is an internationally standardized alphanumeric code that uniquely identifies a bank account. Defined by ISO 13616, it’s used in over 80 countries to make money transfers safer and faster, both domestically and internationally.
Before IBANs, each country had its own bank account format: Italy used ABI+CAB+account number, Germany had BLZ+Kontonummer, France the RIB. This fragmentation caused frequent errors in cross-border transfers. The IBAN solved this by creating a single format recognized by every bank.
Today, IBANs are mandatory for all SEPA (Single Euro Payments Area) transfers and most international wire transfers. Without a valid IBAN, your payment will be rejected or delayed — costing you time and money.
2. Structure of an IBAN code
Every IBAN follows a precise structure made of four parts:
Example — UK IBAN:
GB29 NWBK 6016 1331 9268 19
GB — Country code (ISO 3166-1 alpha-2)
29 — Check digits (validation number)
NWBK — Bank code (NatWest)
601613 — Sort code (branch identifier)
31926819 — Account number
The total length varies by country: the UK uses 22 characters, Germany 22, France 27, Italy 27. The BBAN (Basic Bank Account Number, the part after the check digits) follows each country’s national banking rules.
| Component | Length | Content |
|---|---|---|
| Country code | 2 letters | ISO country identifier (GB, DE, FR, IT...) |
| Check digits | 2 digits | Calculated using MOD-97 algorithm to catch errors |
| BBAN | Variable (max 30) | National bank account details (bank, branch, account) |
3. How the check digit works (MOD-97)
The check digit is the heart of IBAN validation. It uses the MOD-97 algorithm (ISO 7064), which catches 98% of transcription errors, including swapping two adjacent digits.
Here’s how the algorithm works:
- Move the first 4 characters (country code + check digits) to the end
- Convert all letters to numbers: A=10, B=11, C=12... Z=35
- Calculate modulo 97 of the resulting number
- If the result is 1, the IBAN is valid
Example with IBAN GB29 NWBK 6016 1331 9268 19:
- Rearrange: NWBK60161331926819GB29
- Convert letters: 232111601613319268191611 29
- 232111601613319268191611 29 MOD 97 = 1 → Valid IBAN
This algorithm is remarkably effective: even a single wrong digit or letter will cause the modulo 97 check to fail. That’s why banks use it as the first filter before processing any transfer.
4. How to validate an IBAN step by step
Complete IBAN validation involves multiple levels of checking:
Level 1 — Format:
- The country code (first 2 letters) must be a valid ISO 3166-1 code
- The check digits (positions 3-4) must be two numeric digits
- The rest (BBAN) must contain only uppercase alphanumeric characters
- No spaces, hyphens or special characters (spaces are just a display convention)
Level 2 — Length:
- Each country has a fixed, specific IBAN length
- A UK IBAN must be exactly 22 characters, a German one 22, an Italian one 27
- If the length doesn’t match, the IBAN is definitely wrong
Level 3 — MOD-97 check digit:
- Apply the algorithm described in the previous section
- The result must be exactly 1
- If the result is anything else, at least one character is wrong
Level 4 — BBAN structure (optional):
- Verify the BBAN follows the country-specific national format
- For the UK: 4 letters (bank code) + 6 digits (sort code) + 8 digits (account number)
- This level requires knowledge of each individual country’s rules
5. IBAN length by country
Here are the IBAN lengths for the most common countries:
| Country | Code | Length | Example |
|---|---|---|---|
| United Kingdom | GB | 22 | GB29NWBK60161331926819 |
| Germany | DE | 22 | DE89370400440532013000 |
| France | FR | 27 | FR7630006000011234567890189 |
| Spain | ES | 24 | ES9121000418450200051332 |
| Italy | IT | 27 | IT60X0542811101000000123456 |
| Netherlands | NL | 18 | NL91ABNA0417164300 |
| Switzerland | CH | 21 | CH9300762011623852957 |
| Belgium | BE | 16 | BE68539007547034 |
| Austria | AT | 20 | AT611904300234573201 |
| Portugal | PT | 25 | PT50000201231234567890154 |
For the complete list of all 80+ countries that use IBANs, our online validator supports every single format.
6. Common mistakes and how to avoid them
- Confusing similar characters — O with 0, I with 1, B with 8. Always verify visually and use an automatic validator before sending a transfer
- Mixing up IBAN and BIC/SWIFT — The IBAN identifies the account, the BIC/SWIFT identifies the bank. For SEPA transfers, the IBAN alone is sufficient; for non-SEPA international transfers, you need both
- Including spaces in the code — Spaces are just a display convention for readability. The actual IBAN code contains no spaces
- Copying IBANs from formatted documents — PDFs, Word documents and spreadsheets can insert invisible characters. Always verify after copying
- Not checking before a large transfer — An IBAN error could send money to the wrong account. Recovery is slow and not always possible
- Using an old IBAN after switching banks — If you’ve changed banks or closed and reopened your account, the previous IBAN is no longer valid
7. Free Online IBAN Validator
Verify any IBAN in one second with our free tool:
Enter the IBAN code: our validator checks format, country-specific length, MOD-97 check digit and displays bank information. Free, no sign-up, supports 80+ countries.
Also check out: the Invoice Generator to create professional invoices with your bank details, and the VAT Calculator for precise tax calculations. Explore all free ANIMA tools.