Every payment system that accepts an IBAN runs at least two checks: format (length and structure must match the country’s IBAN spec) and mod-97 (the two check digits must produce a remainder of 1 when the IBAN is interpreted as a giant integer modulo 97). A randomly-typed string fails one or both. Building or testing payment software requires inputs that pass these checks but aren’t connected to a real account — that’s where test IBANs come in.
Our test IBAN generator produces format-correct, mod-97-valid IBANs for 75+ countries. The bank code, branch code, and account number sections are randomly filled — but with the right number of digits per country (Germany: 22 chars total, UK: 22, France: 27, Italy: 27, etc.). The resulting IBAN passes IBAN-format validators (which only check structure), but no bank in the world has that account. This guide covers when test IBANs are appropriate, the legal lines you must not cross, and the gotchas that have surprised people who thought “test IBANs” meant “free money”.
Legitimate uses for test IBANs
| Use case | OK? | Why |
|---|---|---|
| QA testing a payment form | Yes | Validates format / mod-97 logic without using real data |
| Synthetic data for unit tests | Yes | Test fixtures need consistent, valid-shape data |
| Classroom / training examples | Yes | Demonstrate format without using real accounts |
| Mockup screenshots and slides | Yes | Realistic-looking placeholder data |
| Filling out a real bank form | No | Will be flagged as suspicious; can be fraud depending on intent |
| Setting up a recurring direct debit | No | Will fail at the bank’s account-existence check |
| “Free trial” abuse | No | Most fraud / consumer-protection law applies; credit-card-fraud-equivalent in many jurisdictions |
The only safe rule: test IBANs are for testing your code or learning the format. They’re not a workaround for any real-world process that demands a real bank account.
How an IBAN is structured
An IBAN is a fixed-format string defined by ISO 13616. The structure varies per country but always follows this pattern:
- 2 letters: ISO country code (DE, FR, GB, IT, US — but US doesn’t issue IBANs natively)
- 2 digits: Mod-97 check digits
- Variable digits/letters: Bank code, branch code, account number — country-specific structure
Total length: 15 to 34 characters depending on country. Germany is 22, UK is 22, France is 27, Italy is 27, Saudi Arabia is 24. The full per-country structure is published by SWIFT and ECBS.
The mod-97 check (and why it works)
The check is an integrity protection against typos: take the IBAN, move the first 4 characters to the end, replace each letter with a 2-digit number (A=10, B=11, …, Z=35), then compute the resulting giant integer modulo 97. The result must be 1.
This catches single-digit typos with high probability and most transposition errors. It doesn’t verify that the account exists — only that the format is internally consistent. So a generated IBAN passes mod-97 (we compute the check digits correctly) but a bank’s account-lookup will return “no such account”.
How to generate test IBANs
- Open the test IBAN generator
- Pick a country (Germany default — 75+ supported)
- Click Generate. The IBAN appears with proper formatting (groups of 4 digits separated by spaces)
- Click Copy — the IBAN is copied without spaces (IBANs are stored without spaces; spaces are display-only)
- Generate batches of 10/100/1000 with the Bulk button for stress-testing payment forms
Common gotchas
- Format-valid is not account-valid. Our IBANs pass mod-97 and length checks. Banks’ real account-lookup APIs (e.g., SEPA RT1 / SCT) will reject them with “account not found” because no matching account exists. Use real test accounts from your payment provider for end-to-end testing.
- Country-specific bank codes. Some countries (Germany, France, Italy) have published lists of valid bank codes. Our generator uses random bank codes that may or may not match a real bank — but the IBAN format remains valid. Some validators check both format AND that the bank code is in the official list.
- SWIFT/BIC generation is separate. An IBAN by itself isn’t enough for international transfers — you also need a BIC (also called SWIFT code). Our tool generates IBAN only; for test BICs, see the SWIFT registry’s list of “00000” test prefixes.
- Spaces don’t matter for storage. IBANs are stored as compact strings:
DE89370400440532013000. Display format groups them:DE89 3704 0044 0532 0130 00. Both are equivalent. - Lowercase is wrong. Real IBANs use uppercase letters only.
de89...is not a valid IBAN. Our generator outputs uppercase; if you typed an IBAN with lowercase, normalise before validation. - SEPA-extended countries. Some non-EU countries (UK post-Brexit, Switzerland, Norway) participate in SEPA and use IBAN format. Some countries (US, Canada, Australia, India, China) don’t issue IBANs at all — they use their own account number formats.
When NOT to use a test IBAN
For end-to-end payment testing (where money actually moves), use the test environment provided by your payment processor — Stripe, Adyen, GoCardless, Mollie all have test IBAN suites with predictable behaviour (test IBAN A succeeds, test IBAN B fails with “insufficient funds”, test IBAN C times out, etc.). For real-world use, never. For training data in machine learning models, use clearly-labeled synthetic data and document its provenance — confusing test IBANs for real ones in a model’s training set is a privacy and accuracy issue.
Frequently asked questions
Are these IBANs real?
No. They’re format-valid (correct length, valid mod-97 check digits) but not connected to any real bank account. Any real bank’s account-lookup API will return “account not found”.
Can I use these in production?
Only as test data: in unit tests, integration tests, mock-up screenshots, classroom examples, or stress-testing your payment form. Submitting them to a real bank or merchant where you’d be expected to provide a real account is misleading and may be illegal depending on jurisdiction.
Will my payment processor accept these for testing?
For format-validation testing, yes — they pass the format/mod-97 check that most processors run before submitting to the bank. For end-to-end testing, no — you need test IBANs from your processor’s documented test suite that produce predictable success/failure responses.
Why are some country IBANs longer than others?
Country-specific banking systems use different account-number formats. France includes a 5-digit branch code; Germany uses a different 8-digit bank code; Italy includes a 1-character “CIN” check character. Total IBAN length ranges from 15 (Norway) to 34 (Saint Lucia). Each country’s structure is published by SWIFT.
Is my data uploaded?
No. The generator runs in your browser. Generated IBANs are computed locally — never sent to our servers.
Can I validate an existing IBAN with this tool?
Yes — paste an IBAN into the validator mode and the tool checks format and mod-97. It does NOT check whether the IBAN points to a real account; that requires a bank API. For format validation in production, use a library like ibantools (Node) or iban (Python).
Related tools and guides
- Test IBAN Generator
- List Randomizer
- Strong Random Password Generator
- QR Code Generator
- All miscellaneous tools
