Fake IBAN Generator
Generate mathematically valid fake IBANs, correct length and check-digit format, for software testing and QA purposes only.
About the Fake IBAN Generator
Every IBAN generated here has the correct total length for its country and passes the mod-97 checksum, which makes it handy for testing form validation, seeding a test database, or QA work without touching real customer data. The bank code and account digits are picked at random and don't map to any actual bank or account. These numbers are fake by design and must never be used in a real financial transaction.
Why passing the real checksum algorithm is the entire point
A genuinely useful fake IBAN for testing needs to pass the exact same validation logic real banking software applies, otherwise you're not actually testing your form validation, you're just testing whether your code accepts obviously-wrong data. This tool implements the real IBAN check-digit standard (ISO 7064 MOD 97-10) rather than just stringing together random-looking digits, so a fake IBAN generated here will pass any correctly-implemented IBAN format checker, exactly the scenario you want when testing a signup form, a database seed script, or a payment integration's input validation, without ever touching a real account.
How the check-digit algorithm actually works
IBAN validation follows a specific four-step recipe. First, the two check digits and country code get moved from the front to the end of the string, with the check digits temporarily replaced by "00". Second, every letter in that rearranged string is converted to a number, A becomes 10, B becomes 11, all the way to Z as 35 (calculated here as each letter's character code minus 55), turning the whole string into one very long numeric string. Third, that giant number is reduced modulo 97. Fourth, the real check digits are calculated as 98 minus that remainder, zero-padded to two digits if needed. This tool runs that exact sequence to compute a genuinely valid check digit pair for whatever random account body it generates.
Why the modulo math needs BigInt
After converting letters to numbers, the resulting numeric string for a full IBAN can run to 30+ digits, far beyond JavaScript's safe integer range of about 9 quadrillion (2^53 − 1). Using regular JavaScript number division and modulo on a value that large would silently lose precision and produce an incorrect, invalid check digit. BigInt has no such ceiling, it performs exact integer arithmetic no matter how many digits are involved, which is essential here since even a single wrong digit in that calculation would produce an IBAN that fails validation instead of one that correctly passes it.
Why account number structure differs by country
The digits after the check digits, the BBAN (Basic Bank Account Number), aren't randomly formatted the same way for every country, because IBAN is built on top of each country's own pre-existing domestic account numbering scheme. Italy's BBAN structure requires a leading letter (a control character specific to Italian banking) followed by digits, and the Netherlands' BBAN starts with a 4-letter bank code before the account digits, since Dutch bank codes have traditionally been letters rather than numbers. This tool models those country-specific structural quirks rather than generating uniform random digits everywhere, which is part of why generated IBANs vary in total length from 16 characters (Belgium) to 27 (France, Italy) depending on the country selected.
Why cryptographically secure randomness is used instead of Math.random()
Every random digit and letter here comes from crypto.getRandomValues() rather than Math.random(). For a tool generating disposable test data, this is arguably more rigor than strictly necessary, since predictability isn't a security concern for fake test values, but it's a low-cost choice that avoids any of the subtle statistical weaknesses Math.random()'s pseudo-random implementation can have across different browsers and produces genuinely unpredictable, uniformly distributed output for every generated character.
Frequently Asked Questions
Is this a real bank account number I can use for payments?
No, absolutely not. These are randomly generated fake IBANs intended only for software testing, QA, and seeding test databases. They pass the mathematical validation checksum but don't correspond to any real bank or account and must never be used in an actual financial transaction.
Why does the fake IBAN need to pass the real checksum algorithm?
If a fake IBAN didn't pass real validation logic, it wouldn't actually test your form validation or payment integration properly, you'd just be confirming your code rejects obviously invalid input. Passing the genuine ISO 7064 MOD 97-10 checksum makes it useful for testing the exact same validation real banking software performs.
Why does the check-digit calculation require BigInt?
The numeric string produced by converting an IBAN's letters to digits can exceed 30 digits, far beyond JavaScript's safe integer precision limit of about 9 quadrillion. Regular number arithmetic would silently produce incorrect results at that scale, while BigInt performs exact integer math regardless of length.
Why do IBANs for different countries have different lengths and formats?
IBAN is built on top of each country's own pre-existing domestic bank account numbering scheme, so the BBAN portion reflects that country's specific structure, like Italy's leading control letter or the Netherlands' 4-letter bank code. This is why generated IBAN length varies from 16 to 27 characters depending on the selected country.
Why use crypto.getRandomValues() instead of Math.random() for fake test data?
It's extra rigor beyond what's strictly necessary for disposable test values, but it avoids subtle statistical inconsistencies that Math.random()'s implementation can have across different browsers, ensuring more uniformly distributed random characters at essentially no added cost.
Why is the copied IBAN different from what's displayed on screen?
The displayed IBAN is grouped into 4-character blocks separated by spaces, matching how IBANs are conventionally shown on bank statements and cards for readability. The Copy button strips those spaces first, since the actual stored and transmitted IBAN value has no spaces in it.