How the IBAN generator works
Each IBAN is built from the country's structure in the SWIFT IBAN registry: country code, two check digits and the BBAN (bank code, branch and account number). The check digits are calculated with ISO 7064 mod-97, and national checks such as the French RIB key, the Spanish control digits or the Belgian check are satisfied too, so the IBAN passes any validator — including our IBAN validator.
Use a specific bank code
Enter a bank code (for example a German Bankleitzahl or a UK bank code) to get IBANs for that bank — handy when your system routes payments by bank.
IBAN length and structure by country
The BBAN is the national part after the country code and the two check digits. Click a country for its position-by-position breakdown and test cases.
| Country | Code | Length | BBAN | Bank code | SEPA |
|---|---|---|---|---|---|
| Austria | AT | 20 | 16 digits | 5 (Bankleitzahl) | Yes |
| Belgium | BE | 16 | 12 digits | 3 (Bank) | Yes |
| Bulgaria | BG | 22 | 4 letters + 6 digits + 8 letters or digits | 4 () | Yes |
| Croatia | HR | 21 | 17 digits | 7 () | Yes |
| Cyprus | CY | 28 | 8 digits + 16 letters or digits | 3 (Bank code) | Yes |
| Czech Republic | CZ | 24 | 20 digits | 4 () | Yes |
| Denmark | DK | 18 | 14 digits | 4 () | Yes |
| Estonia | EE | 20 | 16 digits | 2 (Bank) | Yes |
| Finland | FI | 18 | 14 digits | 3 () | Yes |
| France | FR | 27 | 10 digits + 11 letters or digits + 2 digits | 5 (Code banque) | Yes |
| Germany | DE | 22 | 18 digits | 8 (Bankleitzahl) | Yes |
| Greece | GR | 27 | 7 digits + 16 letters or digits | 3 (Bank) | Yes |
| Hungary | HU | 28 | 24 digits | 3 () | Yes |
| Iceland | IS | 26 | 22 digits | 2 () | Yes |
| Ireland | IE | 22 | 4 letters or digits + 14 digits | 4 (Bank) | Yes |
| Italy | IT | 27 | 1 letters + 10 digits + 12 letters or digits | 5 (ABI) | Yes |
| Latvia | LV | 21 | 4 letters + 13 letters or digits | 4 (Bank (BIC)) | Yes |
| Liechtenstein | LI | 21 | 5 digits + 12 letters or digits | 5 () | Yes |
| Lithuania | LT | 20 | 16 digits | 5 (Bank) | Yes |
| Luxembourg | LU | 20 | 3 digits + 13 letters or digits | 3 () | Yes |
| Malta | MT | 31 | 4 letters + 5 digits + 18 letters or digits | 4 () | Yes |
| Monaco | MC | 27 | 10 digits + 11 letters or digits + 2 digits | 5 () | Yes |
| Netherlands | NL | 18 | 4 letters + 10 digits | 4 (Bank) | Yes |
| Norway | NO | 15 | 11 digits | 4 () | Yes |
| Poland | PL | 28 | 24 digits | — | Yes |
| Portugal | PT | 25 | 21 digits | 4 (Bank) | Yes |
| Romania | RO | 24 | 4 letters + 16 letters or digits | 4 () | Yes |
| Saudi Arabia | SA | 24 | 2 digits + 18 letters or digits | 2 () | No |
| Slovakia | SK | 24 | 20 digits | — | Yes |
| Slovenia | SI | 19 | 15 digits | 2 () | Yes |
| Spain | ES | 24 | 20 digits | 4 (Entidad) | Yes |
| Sweden | SE | 24 | 20 digits | 3 () | Yes |
| Switzerland | CH | 21 | 5 digits + 12 letters or digits | 5 (Clearing) | Yes |
| Turkey | TR | 26 | 5 digits + 17 letters or digits | — | No |
| Ukraine | UA | 29 | 6 digits + 19 letters or digits | — | No |
| United Arab Emirates | AE | 23 | 19 digits | 3 () | No |
| United Kingdom | GB | 22 | 4 letters + 14 digits | 4 (Bank code (+ sort code next 6)) | Yes |
How to test an IBAN field
- Accept both formats. People paste
DE37 0778 3909 7790 2035 76andDE37077839097790203576. Remove spaces and dashes, convert to capitals, then validate. - Do not hard-code one length. IBANs have 15 to 33 characters today and the standard allows 34. A field limited to 22 characters breaks for France (27), Poland (28) or Malta (31).
- Check the length for the country before the checksum, and show a clear message: “A German IBAN has 22 characters” helps more than “Invalid IBAN”.
- Store the electronic format (no spaces) and show the print format with spaces to people.
- Test non-SEPA countries too (for example Turkey, UAE, Saudi Arabia) if you pay out outside the euro area — some checkout code allows only SEPA countries.
- Never log full IBANs in plain text in analytics or error messages; mask the middle, for example
DE37 **** **** **** **35 76.
FAQ
Are generated IBANs real bank accounts?
No. They are random numbers with a valid structure. No real account is behind them, and a bank transfer to them would be rejected.
What can I use them for?
Testing payment and payout forms, SEPA direct debit mandates, KYB onboarding, database fixtures and demos.
Which format should I store?
The electronic format without spaces. Show the print format with spaces to people.
Can I use them in a PSP sandbox?
Sometimes. Many sandboxes only accept their own test IBANs — check your provider's documentation.
What is the maximum length of an IBAN?
34 characters according to ISO 13616. The longest IBAN in the SWIFT registry today has 33 characters; in Europe Malta has 31.
Why do generated IBANs fail at my bank or PSP?
They pass every format check, but no real account is behind them. Live payment systems and many sandboxes check accounts, so use the provider's own test IBANs there.
IBAN generator by country
Austria · Belgium · Bulgaria · Croatia · Cyprus · Czech Republic · Denmark · Estonia · Finland · France · Germany · Greece · Hungary · Iceland · Ireland · Italy · Latvia · Liechtenstein · Lithuania · Luxembourg · Malta · Monaco · Netherlands · Norway · Poland · Portugal · Romania · Saudi Arabia · Slovakia · Slovenia · Spain · Sweden · Switzerland · Turkey · Ukraine · United Arab Emirates · United Kingdom