BankCheck
HomeIBANRouting NumberSort CodeSWIFT/BICGeneratorGuides
Home
IBAN
Routing Number
Sort Code
SWIFT/BIC
Generator
Guides

BankCheck

Validate any bank number instantly. Free and 100% client-side.

Your data never leaves the browser

Formats

IBAN40+ countriesRouting NumberUnited StatesSort CodeUK & IrelandSWIFT/BICWorldwide

Info

IBAN GeneratorTransfer GuidesGlossaryGuidesCompareAlternativesAboutPrivacy PolicyTerms of UseAPI Docs

BankCheck checks whether a number could be valid based on format, length, and checksum rules. It does not verify that an account exists or confirm who it belongs to. Always confirm account details with your bank before making a payment.

© 2026 BankCheck

How to Generate an IBAN

8 min read|Updated March 25, 2026

IBAN generation is the process of converting domestic bank account details — such as a bank code, branch identifier, and account number — into a standardized International Bank Account Number. The process follows the rules defined in ISO 13616, which specifies the structure and check-digit calculation for IBANs worldwide. If you are unfamiliar with IBANs, our guide on what an IBAN is and how it works provides the essential background. This guide focuses specifically on how IBANs are assembled from their component parts, walks through a complete worked example, and covers country-specific considerations that affect the generation process.

What IBAN Generation Actually Does

A common misconception is that "generating an IBAN" means creating a new bank account. It does not. IBAN generation takes your existing domestic bank details and reformats them into the internationally recognized IBAN structure. Your bank code, branch identifier, and account number are preserved in their entirety — the process simply wraps them in a standardized envelope by prepending a two-letter country code and a two-digit checksum.

Think of it like converting a local postal address into an international mailing format. The underlying address does not change; it is simply presented in a way that postal systems around the world can process consistently. Similarly, your domestic bank details remain the same — the IBAN format just makes them universally readable by banking systems in over 80 countries.

The domestic portion of the IBAN is called the BBAN (Basic Bank Account Number). Each country defines its own BBAN structure — specifying which positions hold the bank code, which hold the branch code, and which hold the account number. The IBAN generation process assembles the BBAN according to these country-specific rules and then computes the check digits that protect against transcription errors.

The IBAN Generation Process

Generating an IBAN from domestic bank details follows a precise sequence of steps. Each step must be performed correctly for the resulting IBAN to be valid.

  1. Identify the country code. Use the ISO 3166-1 alpha-2 code for the country where the bank account is held. For example, DE for Germany, GB for the United Kingdom, or FR for France.
  2. Look up the BBAN structure for that country. The SWIFT IBAN Registry defines the exact length and character pattern for each country's BBAN. Germany, for instance, requires an 18-digit numeric BBAN (8-digit bank code + 10-digit account number). The UK requires a 4-letter bank code followed by a 14-digit sort code and account number combination.
  3. Assemble the BBAN from your domestic details. Concatenate the bank code, branch code (if applicable), and account number in the order specified by the country's BBAN format. Pad shorter account numbers with leading zeros to reach the required length.
  4. Compute the check digits. Create a placeholder IBAN by combining the country code, two zeros (as temporary check digits), and the BBAN. Rearrange by moving the first four characters to the end. Convert all letters to numbers (A = 10, B = 11, ... Z = 35). Compute the remainder when dividing the resulting number by 97. The check digits are 98 minus this remainder, zero-padded to two digits if needed.
  5. Assemble the final IBAN. Combine the country code, the computed check digits, and the BBAN. The result is the complete IBAN, ready for use in international transfers.

Worked Example: Generating a German IBAN

Let's walk through the generation of the German IBAN DE89 3704 0044 0532 0130 00 from its domestic components: bank code 37040044 and account number 0532013000.

Step 1: Assemble the BBAN

Germany's BBAN format is 18 digits: 8-digit bank code (Bankleitzahl) followed by a 10-digit account number. Concatenate them:

BBAN = 370400440532013000

Step 2: Create the placeholder IBAN

Prepend the country code and temporary check digits 00 to the BBAN:

DE00370400440532013000

Step 3: Rearrange for MOD-97

Move the first four characters (DE00) to the end:

370400440532013000DE00

Step 4: Convert letters to numbers

Replace each letter with its numeric equivalent: D = 13, E = 14. The string becomes:

370400440532013000131400

Step 5: Compute MOD 97

Divide the numeric string by 97 and take the remainder. Using the chunking method (processing 9 digits at a time to stay within standard integer limits):

  • 370400440 MOD 97 = 29
  • 295320130 MOD 97 = 70
  • 700013140 MOD 97 = 29
  • 290 MOD 97 = 9

The remainder is 9.

Step 6: Calculate the check digits

Check digits = 98 – remainder = 98 – 9 = 89. Since the result is already two digits, no zero-padding is needed.

Final IBAN: DE89 3704 0044 0532 0130 00

You can verify this result by running the generated IBAN through the MOD-97 validation algorithm: rearrange, convert, and divide by 97 — the remainder should be exactly 1.

Country-Specific Considerations

While the check-digit calculation is universal (MOD-97 per ISO 7064), the BBAN structure varies significantly between countries. Some countries also include national check digits within the BBAN, adding an extra layer of validation that must be computed correctly during generation.

France — RIB Key

French IBANs are 27 characters long. The BBAN contains a 5-digit bank code, a 5-digit branch code (code guichet), an 11-character account number (which may include letters), and a 2-digit RIB key. The RIB key is a national check digit calculated as 97 – ((bank code × 89 + branch code × 15 + account number × 3) MOD 97). This key must be computed and included in the BBAN before the IBAN check digits are calculated. An incorrect RIB key will produce an IBAN that passes MOD-97 validation but may be rejected by French banks during processing.

Spain — CCC Check Digits

Spanish IBANs are 24 characters long. The 20-digit BBAN includes a 4-digit bank code, a 4-digit branch code, a 2-digit national control code (the CCC check digits), and a 10-digit account number. The CCC check digits are calculated using a weighted modulus-11 algorithm applied separately to the bank/branch portion and the account number. Both national check digits must be correct before the IBAN's MOD-97 check digits are computed.

Belgium — MOD-97 National Check

Belgian IBANs are 16 characters long. The 12-digit BBAN comprises a 3-digit bank code, a 7-digit account number, and a 2-digit national check digit. The national check digit is calculated as the first 10 digits of the BBAN MOD 97 (with 00 replaced by 97 when the remainder is 0). This national check digit is independent of the IBAN-level MOD-97 check digits, meaning Belgian IBANs effectively have two layers of checksum protection.

When generating IBANs for countries with national check digits, you must compute those national digits first, then assemble the complete BBAN, and finally compute the IBAN-level check digits. Skipping the national check digit step will produce an IBAN that may pass basic MOD-97 validation but will fail country-specific validation at the receiving bank.

Generator vs. Manual Calculation

For practical purposes, using an IBAN generator tool is almost always the right choice. Generators eliminate human error in every step of the process — from looking up the correct BBAN length to computing check digits. A single misplaced digit or forgotten leading zero will produce an invalid IBAN, and manually computing MOD-97 on a 24-digit number is tedious and error-prone.

That said, understanding the manual process has real value. Developers building payment systems need to know how the algorithm works to implement it correctly, debug validation failures, and write meaningful tests. Compliance officers benefit from understanding the mechanics when auditing payment processing systems. And anyone who works with IBANs regularly will make fewer mistakes if they understand the structure behind the numbers.

The key distinction is: use a generator for production work and real transactions, but understand the manual process so you can verify results and troubleshoot problems when they arise.

Common Mistakes When Generating IBANs

Even with a solid understanding of the process, certain mistakes come up repeatedly. Being aware of them helps you avoid generating invalid IBANs:

  • Using the wrong length for the country. Each country has a fixed IBAN length. A German IBAN is always 22 characters; a Spanish IBAN is always 24. Using the wrong length means the BBAN is either too short (missing digits) or too long (extra digits), and the resulting IBAN will fail validation.
  • Forgetting to pad with leading zeros. Account numbers shorter than the country's required length must be left-padded with zeros. For example, if a German account number is 532013000 (9 digits), it must be padded to 0532013000 (10 digits). Omitting the leading zero shifts every subsequent digit, producing an entirely different (and likely invalid) IBAN.
  • Confusing bank code with branch code. In some countries, the bank code and branch code are separate identifiers that occupy specific positions in the BBAN. Swapping them or concatenating them in the wrong order will produce an IBAN that points to the wrong institution or fails validation entirely.
  • Ignoring national check digits. Countries like France, Spain, and Belgium include national check digits in their BBANs. If you skip this step and only compute the IBAN-level check digits, the resulting IBAN may pass basic MOD-97 validation but will be rejected by the receiving bank's country-specific checks.
  • Using the wrong letter conversion. When converting letters to numbers for the MOD-97 calculation, the mapping is A = 10 through Z = 35. Using ASCII values, custom mappings, or case-sensitive conversions will produce incorrect check digits.
  • Not zero-padding single-digit check digits. If the calculated check digit is a single digit (2 through 9), it must be left-padded with a zero to produce a two-character field. For example, a check value of 6 becomes 06, not just 6.

IBAN Length Reference

The following table shows the IBAN length and BBAN structure for commonly used countries. Refer to the SWIFT IBAN Registry for the complete list.

CountryCodeIBAN LengthBBAN Format
GermanyDE228n bank + 10n account
United KingdomGB224a bank + 6n sort + 8n account
FranceFR275n bank + 5n branch + 11c acct + 2n key
SpainES244n bank + 4n branch + 2n ctrl + 10n acct
NetherlandsNL184a bank + 10n account
ItalyIT271a ctrl + 5n bank + 5n branch + 12c acct
NorwayNO154n bank + 6n account + 1n ctrl

In the BBAN format column, n indicates numeric digits, a indicates uppercase letters, and c indicates alphanumeric characters (letters or digits).

Frequently Asked Questions

Can I generate an IBAN for any country?
You can generate an IBAN for any of the 80+ countries that have registered an IBAN format in the SWIFT IBAN Registry. Countries that have not adopted the IBAN system — such as the United States, Canada, Australia, and most of Asia — do not have IBAN formats, so generation is not possible for accounts in those countries. The US uses ABA routing numbers and account numbers instead.
Is a generated IBAN automatically valid at a bank?
A correctly generated IBAN will pass MOD-97 checksum validation and country-specific format checks. However, this does not guarantee that the underlying account exists or is active. The IBAN generation process validates the format, not the account. If you enter a bank code that does not exist or an account number that was never issued, the generated IBAN will be structurally valid but will fail when used for an actual transfer. Always verify your domestic details with your bank before generating an IBAN.
Can I reverse-engineer domestic details from an IBAN?
Yes. Because an IBAN is a structured wrapper around domestic bank details, you can extract the bank code, branch code, and account number by knowing the country's BBAN format. For example, from DE89 3704 0044 0532 0130 00, you can extract the bank code 37040044 (positions 5–12) and the account number 0532013000 (positions 13–22). Our IBAN validator performs this breakdown automatically.
Do I need a SWIFT/BIC code to generate an IBAN?
No. IBAN generation requires only the country code, bank code (or bank identifier), and account number. The SWIFT/BIC code identifies the bank institution for message routing on the SWIFT network, but it is not part of the IBAN structure and is not needed for IBAN generation. However, when you actually send an international transfer outside the SEPA zone, you will typically need both the recipient's IBAN and their bank's SWIFT/BIC code. For more on the difference, see our guide on IBAN vs. SWIFT code.

Generate an IBAN

Ready to convert your domestic bank details into an IBAN? Use our IBAN generator to assemble a valid IBAN from your bank code and account number. The tool handles country-specific BBAN formats, national check digits, and MOD-97 calculation automatically. All processing runs entirely in your browser — no bank details are sent to any server.

Related Guides

How to Calculate IBAN Check Digits

7 min read

What Is an IBAN?

8 min read

Back to all guides.