Skip to content
faker.tools
All 79

Plate III · Financial, E-Commerce & Retail Stubs

IBAN & SWIFT Generator

Test IBANs with valid mod-97 and national check digits for ten European countries.

#IBANCountrySWIFT/BICBankChecksum Valid
1GB75 XSYS 2472 6029 0377 28GBULIIGB9AO5SVerdant Financialtrue
2GB56 DAIB 2941 9711 8007 11GBSWTGGBCOHarborline Banktrue
3ES47 5326 2901 8425 2863 7560ESDFBPESKXVerdant Financialtrue
4GB98 BQGG 8433 8908 9448 32GBLLFEGBCICWDTessera Banktrue
5ES40 9145 7253 7767 0213 3033ESFOGIES87Harborline Banktrue
6ES31 5969 1804 7311 6053 0160ESZLLTESBNYONHarborline Banktrue
7DE63 7372 2439 7055 2285 47DEOGPGDE83Anvil Mutualtrue
8DE97 1365 6022 6723 8194 04DENPOKDEG0BZ0Anvil Mutualtrue
9FR76 0325 8063 0541 1720 2340 994FRPCCDFRQG37WAnvil Mutualtrue
10FR76 1678 0533 1855 4239 8738 997FRCEFZFRVWUMSTessera Banktrue
10 rows · 1.2 KBGenerated in your browser · IBAN & SWIFT Generator

A test IBAN is an International Bank Account Number whose check digits are correct but which belongs to no account. This generator builds them for ten European countries: the two IBAN check digits are computed with the ISO 13616 mod-97 algorithm, and for Belgium, France, Italy, Portugal and Spain the national check digits inside the account number are computed too. Your validation library accepts them, so the code after validation gets tested.

That second layer is where most IBAN generators fall short. Popular libraries such as ibantools (JavaScript) and python-stdnum check the national digits for those countries, and an IBAN with random digits in their place fails there.

How to use it

  1. Tick the countries your product supports — add one you do not support to test the rejection.
  2. Choose grouped (DE89 3704 …, as banks print it) or unbroken (as systems store it). Test your input field with both.
  3. Toggle SWIFT/BIC, bank name and account holder to match the fields your form collects.
  4. Export the batch as JSON, CSV or SQL. The seed makes the same IBANs come back next time.

What you can control

  • Ten countries with their correct total length and BBAN structure: Germany (22), France (27), United Kingdom (22), Spain (24), Italy (27), Netherlands (18), Belgium (16), Switzerland (21), Sweden (24) and Portugal (25).
  • ISO 13616 mod-97 check digits on every IBAN, computed rather than faked.
  • National check digits for Belgium (mod 97), France (RIB key), Italy (CIN letter), Portugal (NIB check digits) and Spain (two control digits).
  • Grouped or unbroken display.
  • SWIFT/BIC codes in the correct 8- or 11-character shape, with the matching country code.

How the mod-97 check works

Take the documentation example GB82 WEST 1234 5698 7654 32:

  1. Move the first four characters to the end: WEST12345698765432GB82.
  2. Replace each letter with two digits, A = 10 through Z = 35. W = 32, E = 14, S = 28, T = 29, G = 16, B = 11: 3214282912345698765432161182.
  3. Take that number modulo 97. A valid IBAN leaves a remainder of exactly 1.

To generate check digits, set them to 00, run the same steps, and subtract the remainder from 98. The number is too large for a 64-bit integer, so validators process it a few digits at a time:

function ibanValid(iban) {
  const s = iban.replace(/\s+/g, "").toUpperCase();
  const rearranged = s.slice(4) + s.slice(0, 4);
  let remainder = 0;
  for (const ch of rearranged) {
    const value = ch >= "A" ? String(ch.charCodeAt(0) - 55) : ch;
    for (const digit of value) remainder = (remainder * 10 + Number(digit)) % 97;
  }
  return remainder === 1;
}

In Python, stdnum.iban.validate("GB82WEST12345698765432") does the same and also applies the national rules.

Testing ideas

  • Length per country. Feed a Belgian 16-character IBAN and an Italian 27-character one into the same field. A maxlength="22" copied from a German example truncates the Italian one silently.
  • Spaces and case. Paste grouped, unbroken and lowercase versions. A good field normalises all three before validating.
  • Country allow-list. If you only accept SEPA countries or only EUR accounts, check that a GB or CH IBAN produces the right message.
  • Storage. Store the unbroken form and display the grouped one. Generate both and confirm round-tripping does not double the spaces.

What this is not

The check digits are genuine; the accounts are not. No bank holds them, the bank codes are not in any registry, and a transfer to one fails at clearing. For the algorithms behind every check digit on this site, read Check digits that test data must satisfy.

Questions

Will an IBAN validator accept these?

Yes. The ISO 13616 mod-97 check digits are computed for every IBAN, and the national check digits inside the BBAN are computed for Belgium, France, Italy, Portugal and Spain. A batch of 5,000 passed both ibantools and python-stdnum's checksum validation. Validators that also look the bank code up in a registry will reject them, because no real bank uses these codes.

Can I send money to a generated IBAN?

No. No bank holds these accounts. A payment to one passes your form's validation and then fails at clearing, which is exactly where you want a test value to stop.

Are the SWIFT/BIC codes real?

No. They have the correct 8- or 11-character structure, with the country code in positions five and six, but no institution is registered under them.

Why do IBAN lengths differ by country?

Each country defines its own BBAN layout. Belgium's IBAN is 16 characters, Germany's 22, France's and Italy's 27. The length is fixed per country, which makes it a useful validation rule on its own.

Is there an official test IBAN?

The IBAN registry publishes example IBANs such as GB82 WEST 1234 5698 7654 32 for documentation. They are fine for a single hard-coded example, but a test suite needs variety across countries and lengths, which is what a generator gives you.

Next in Finance

All 11 →