▶ Random Everything - 100+ Free Generators // v2.13.8
root@generate-random:~/ibans$ _

IBAN Generator (Test Data)

Generate valid test IBAN numbers for development, testing, and QA with mod-97 algorithm validation - TESTING ONLY

[ Test IBANs - Quick Summary ]

What: Generates test IBANs (International Bank Account Numbers, ISO 13616) for 14 European countries, with the right length for each country and correct mod-97 check digits.

When to use: Testing bank-transfer and SEPA direct debit forms, IBAN validation code, payroll and supplier records, onboarding flows, database seeds and API contract tests.

Example: DE89 3704 0044 0532 0130 00 (the well-known German sample IBAN, 22 characters)

Important: TESTING ONLY. A generated IBAN is not a real bank account. It passes the IBAN check, but no bank holds an account under that number, so nothing can be paid into or collected from it.

This test IBAN generator creates fake but well-formed International Bank Account Numbers for software testing. Pick a country, and each IBAN gets that country's code, the length its banking system uses and two check digits calculated with the ISO 7064 mod-97 method, so it passes the same IBAN check that banking forms and libraries run. Use them to fill SEPA payment forms, seed test databases, check that your validation accepts good IBANs and rejects mistyped ones, or demo an app without exposing anyone's real bank details. The IBANs are random: they don't belong to anyone, aren't linked to a real bank account and can't send or receive money.

What is an IBAN?

An IBAN (International Bank Account Number) identifies one bank account in a format that works across borders. It is defined by ISO 13616, and SWIFT, as the standard's registration authority, publishes each country's exact format in the IBAN Registry. Every IBAN has the same three parts:

  • Country code: two letters from ISO 3166-1, such as DE for Germany or FR for France.
  • Check digits: two digits from 02 to 98, calculated from the rest of the IBAN with the mod-97 method below.
  • BBAN (Basic Bank Account Number): the domestic account number. Its length and layout are fixed per country and usually hold a bank code, sometimes a branch code, the account number and, in some countries, a national check digit.

An IBAN can be up to 34 characters long, but each country uses one fixed length: Norway 15, Belgium 16, Germany and the UK 22, France and Italy 27, Poland 28. The electronic form is written without spaces (DE89370400440532013000). On paper and on screen, it's split into groups of four (DE89 3704 0044 0532 0130 00). In the German example, DE is the country, 89 the check digits, 37040044 the 8-digit bank code (Bankleitzahl) and 0532013000 the 10-digit account number.

How the mod-97 check works

The check digits let software catch typos before a payment is sent. To validate an IBAN:

  1. Remove spaces and check that the length is right for the country.
  2. Move the first four characters (country code and check digits) to the end.
  3. Replace every letter with two digits: A = 10, B = 11, and so on up to Z = 35.
  4. Read the result as one large whole number and divide it by 97. The IBAN is valid only if the remainder is 1.

Worked example: DE89370400440532013000 becomes 370400440532013000DE89. With D = 13 and E = 14, that's 370400440532013000131489, and that number mod 97 is 1, so the IBAN is valid. To create check digits, you put 00 in their place, do the same calculation, and subtract the remainder from 98. For the German example, the remainder is 9 and 98 - 9 = 89. Results below 10 get a leading zero.

The numbers are too long for normal 64-bit integers, so code usually reads them a few digits at a time and keeps only the running remainder. The check reliably catches a single wrong character and two neighbouring characters swapped, the most common typing errors. It only proves that the number is well formed. It can't tell whether the bank exists, whether the account is open or who owns it.

Supported countries and IBAN formats

The generator covers 14 countries, all of them in the SEPA area. The lengths match the SWIFT IBAN Registry. The layout column shows what the BBAN contains in real IBANs from that country (n = digits, a = letters, c = letters or digits):

CodeCountryLengthBBAN layout
ATAustria205n bank code + 11n account
BEBelgium163n bank + 7n account + 2n check
CHSwitzerland215n bank clearing number + 12c account
DEGermany228n Bankleitzahl + 10n account
DKDenmark184n registration number + 10n account
ESSpain244n bank + 4n branch + 2n check + 10n account
FIFinland1814n bank code and account, ending in a check digit
FRFrance275n bank + 5n branch + 11c account + 2n RIB key
GBUnited Kingdom224a bank identifier + 6n sort code + 8n account
ITItaly271a CIN check letter + 5n ABI + 5n CAB + 12c account
NLNetherlands184a bank identifier + 10n account
NONorway154n bank + 7n account, ending in a check digit
PLPoland288n bank and branch + 16n account
SESweden243n bank + 17n account

What the generator does and doesn't do: it fills the whole BBAN with random digits, then calculates the IBAN check digits. Every IBAN it produces has the right country code, the right length and valid mod-97 check digits. It does not build the national parts: UK and Dutch IBANs get four digits where real ones have four letters (a real UK example is GB82 WEST 1234 5698 7654 32), the Italian CIN is a digit instead of a letter, and the national check digits used in France, Spain, Belgium, Italy, Norway and Finland are random. A validator that checks only the IBAN standard will accept these test IBANs. A validator that also applies national bank-code or account-number rules can reject them, which is useful if you want to test that stricter path too.

IBAN Generator Options

Quantity (1-20)

How many IBANs to create in one batch, up to 20. Each one gets its own random BBAN and its own check digits. A small batch is enough to test a form. A full batch of 20 gives you a list to paste into a seed file or a parameterised test.

Country

One of the 14 countries in the table above. The country decides the two-letter prefix and the total length. Germany is the default. Switch countries to check that your form doesn't assume a single length, which is a common bug when a UK or German-only form meets a Norwegian (15) or Polish (28) IBAN.

Formatted

On by default: IBANs are shown in groups of four separated by spaces, the way people read them on statements and invoices. Turn it off to get the electronic format with no spaces, the form that payment files and most APIs expect. Use both to check that your input field strips spaces and accepts lowercase before validating.

How to Generate Test IBANs

[STEP 1] Choose the country and quantity

Pick the country your form or system should handle and how many IBANs you need. If your product accepts IBANs from several countries, generate a few from each: lengths range from 15 to 28 characters across the supported list.

[STEP 1] Choose the format

Keep "formatted" on for data people would type or paste from a statement. Turn it off for the compact electronic format used in payment files and API requests.

[STEP 1] Generate and copy

Run the generator. Each IBAN is listed with its country. Copy single values, or export the batch as TXT or CSV to load into a test database, spreadsheet or test fixture.

[STEP 1] Use them only in test environments

Feed them to forms, validators and sandboxes. Don't put them in live payment runs or real mandates: a transfer to a test IBAN will be rejected by the receiving side, because no such account exists.

Testing with IBANs

  • _ Test both sides of validation. Your code should accept every generated IBAN. Then change one character, swap two neighbouring digits or drop the last character: each of those must now fail. Also try a wrong length for the country, an unknown country code and an IBAN with spaces or lowercase letters.
  • _ Don't hard-code one length. IBAN length depends on the country, and a field limited to 22 characters will cut off French, Italian and Polish IBANs. Store IBANs in the electronic format (uppercase, no spaces), allow up to 34 characters, and add the spaces only when you display them.
  • _ Know which checks you run. The IBAN standard only requires the country length and the mod-97 result. Some systems go further and check the national bank code against a bank directory or apply domestic check-digit rules. Random test IBANs pass the first kind of check, not the second.
  • _ Keep test and real data apart. Mark test records clearly, keep them out of production payment runs, and never copy real customers' IBANs into development databases. Generated IBANs let you build and demo bank-detail features without handling anyone's personal financial data.
  • _ Use the bank's or provider's own test accounts for end-to-end tests. To see how a real transfer or SEPA direct debit is accepted, rejected or returned, use the sandbox IBANs and scenarios your bank or payment provider documents. Random IBANs are for forms, validation and data, not for simulating bank responses.
  • _ BIC is a separate code. A BIC (also called a SWIFT code, ISO 9362) identifies the bank, not the account: 4 characters for the bank, 2 for the country, 2 for the location and an optional 3-character branch code. For SEPA transfers in euros, the IBAN alone is enough and the BIC is optional. Outside SEPA, many international payments still need both.

Technical Implementation - Building a Test IBAN

How this generator builds each IBAN, and how to check one in your own code:

// Build a test IBAN
country = "DE"                       // one of the 14 supported countries
length  = IBAN_LENGTH[country]       // e.g. DE = 22, FR = 27, NO = 15
bban    = random_digits(length - 4)  // random digits, no real bank or account

// Check digits (ISO 7064 MOD 97-10)
rearranged = bban + country + "00"
numeric    = letters_to_digits(rearranged)   // A=10, B=11 ... Z=35
check      = 98 - mod97(numeric)
iban       = country + zero_pad(check, 2) + bban

// Validate any IBAN
function is_valid(iban):
  iban = remove_spaces(uppercase(iban))
  if length(iban) != IBAN_LENGTH[first_two(iban)]: return false
  rearranged = iban[4:] + iban[0:4]
  return mod97(letters_to_digits(rearranged)) == 1

// mod97 on a long digit string, a few digits at a time
function mod97(digits):
  remainder = 0
  for each digit d in digits:
    remainder = (remainder * 10 + d) % 97
  return remainder

// Example: DE89 3704 0044 0532 0130 00
// 370400440532013000 + "DE00" -> 370400440532013000131400
// mod 97 = 9 -> check digits 98 - 9 = 89

API Access for Developers

Generate test IBANs from your scripts and CI pipelines with the free REST API. Parameters: country (two-letter code, default DE), quantity (1-20) and formatted (true or false). GET /api/v1/ibans/countries lists the supported countries and their IBAN lengths, and POST /api/v1/ibans/validate with an iban field runs the length and mod-97 check on any IBAN you send.
GET https://generate-random.org/api/v1/generate/ibans?country=FR&quantity=5&formatted=false
VIEW FULL API DOCUMENTATION →

Frequently Asked Questions

Are these real bank accounts?

No. Each IBAN is built from random digits and has the correct check digits, but no bank has an account under that number. Money can't be sent to or collected from it, and a transfer would be rejected by the receiving side. They exist so you can test software without using anyone's real bank details.

Why do the generated IBANs pass validation?

IBAN validation checks the length for the country and the two check digits with the mod-97 method: move the first four characters to the end, turn letters into numbers (A = 10 ... Z = 35), and the result divided by 97 must leave a remainder of 1. The generator calculates the check digits that way, so its IBANs pass. Passing only means the number is well formed, not that the account exists.

Will a strict validator accept them?

It depends on what it checks. Validators that follow the IBAN standard (length and mod-97) accept them. Validators that also check the national part may not: the generator uses digits where UK and Dutch IBANs carry a four-letter bank identifier, and it doesn't calculate national check digits such as the French RIB key or the Spanish control digits. Tools that look up the bank code in a bank directory will also not find a match.

What is the difference between an IBAN and a BIC or SWIFT code?

The IBAN identifies one account. The BIC (Business Identifier Code, often called the SWIFT code) identifies the bank, with 8 or 11 characters: bank, country, location and an optional branch. For euro transfers within SEPA, the IBAN alone is enough. This generator produces IBANs only. If your form also needs a BIC, the person generator's bank details include one.

Which countries use IBANs?

All SEPA countries and many others in Europe, the Middle East, North Africa and the Caribbean use IBANs. The SWIFT IBAN Registry lists every country and its format. The United States, Canada and Australia don't use IBANs for domestic accounts and rely on routing numbers or BSB codes instead. This generator supports 14 European countries: Austria, Belgium, Denmark, Finland, France, Germany, Italy, the Netherlands, Norway, Poland, Spain, Sweden, Switzerland and the United Kingdom.

Can I use these IBANs in a SEPA direct debit test?

Yes, to test your own forms, mandate screens and payment-file generation, as long as nothing is sent to a real bank. Collecting from a made-up IBAN in a live system would just fail. To test how a bank answers (accepted, rejected or returned), use the test accounts and scenarios your bank or payment provider gives you.

[ HOW TO CITE THIS PAGE ]

APA Style:
Generate-Random.org. (2026). IBAN Generator (Test Data). Retrieved from https://generate-random.org/ibans
Web Citation:
IBAN Generator (Test Data) - Generate-Random.org (https://generate-random.org/ibans)