IBAN stands for International Bank Account Number — an internationally agreed format (ISO 13616) for identifying bank accounts across borders. If you have ever built a payment form, a SEPA transfer flow, or a fintech onboarding screen, you have almost certainly needed to validate or generate one.
This guide breaks down what an IBAN actually contains, why it is self-validating, and how to safely generate test IBANs without using real customer banking data.
IBAN structure, piece by piece
Every IBAN is built from three parts, always in the same order: a 2-letter country code, a 2-digit check number, and a country-specific BBAN (Basic Bank Account Number).
The BBAN portion varies by country — both in length and in which characters are numeric, alphabetic, or alphanumeric. Germany uses 18 numeric digits; the UK uses 4 letters (the bank code) followed by 14 digits; Switzerland uses 5 numeric digits followed by 12 alphanumeric characters.
- Country code — 2 letters, e.g. DE for Germany, GB for United Kingdom
- Check digits — 2 digits, computed from the rest of the IBAN using mod-97
- BBAN — the country-specific account identifier, varying length and format per country
Why IBANs have check digits
The 2-digit check number lets software verify an IBAN's structural validity without making a network call to a bank. It is calculated using the ISO 13616 mod-97 algorithm: the IBAN is rearranged, letters are converted to numbers (A=10 through Z=35), and the result must produce a remainder of exactly 1 when divided by 97.
This makes IBANs self-validating for format — but it is important to understand what that does and does not prove. A checksum-valid IBAN confirms the structure is correct. It does not confirm that a real bank account exists behind it.
IBAN length varies by country
There is no single IBAN length — it ranges from 15 characters (Norway) to 31 characters (Malta), with the maximum allowed by the standard being 34 characters.
| Country | Code | IBAN Length |
|---|---|---|
| Germany | DE | 22 |
| United Kingdom | GB | 22 |
| France | FR | 27 |
| Switzerland | CH | 21 |
| Norway | NO | 15 |
| Malta | MT | 31 |
Using fake IBANs for development and testing
Using real customer IBANs in development, staging, or automated tests is a data-minimization risk under data-protection rules like GDPR. The safer approach is to use synthetic IBANs that pass the same mod-97 checksum validation as real ones, but are randomly generated and not checked against any bank's account records.
Fake IBAN Generator produces checksum-valid test IBANs for 36 European countries, with bulk generation and CSV/JSON/TXT export for seeding QA databases and test fixtures.
Khushbu
Full-Stack Developer & Founder
I build tools I wish existed — fast, free, and private. Every tool runs in your browser because I believe your data should stay yours.
Tools mentioned in this guide

