← Back to blog

How to Find the Bank Code From an IBAN

July 19, 2026
How to Find the Bank Code From an IBAN

The bank code embedded in an IBAN is a country-specific sequence of characters that identifies the financial institution holding the account. It sits inside the BBAN (Basic Bank Account Number) segment, which begins at character position 5 of every IBAN. The exact length and position of the bank code within that segment depends entirely on the country issuing the IBAN. Germany uses a bank code of a specific length starting at position 5. France uses a shorter code at the same starting position. Poland uses a bank code similar in length to Germany's. The structure is standardized at the IBAN level, but the internal layout of the BBAN is set by each country's national standards body.

To extract the bank code from any IBAN, follow these steps:

  • Strip the country code and check digits. The first two characters are the country code (e.g., DE for Germany, FR for France). Characters 3 and 4 are the check digits. Everything from position 5 onward is the BBAN.
  • Look up the country's IBAN format. Each country publishes its BBAN layout specifying where the bank code starts and how many characters it occupies.
  • Slice the bank code from the BBAN. For a German IBAN like DE89370400440532013000, the BBAN is 370400440532013000, and the first 8 digits (37040044) are the bank code (Bankleitzahl).
  • Cross-reference with a BIC/SWIFT registry. The bank code alone identifies the institution within the domestic system. A BIC code lookup maps that code to the internationally recognized SWIFT identifier.

Here is a quick-reference table for bank code positions in commonly used IBANs:

CountryIBAN LengthBank Code Position (in BBAN)Bank Code Length
Germany (DE)Characters 1–8 of BBAN8 digits
France (FR)Characters 1–5 of BBAN5 digits
Poland (PL)Characters 1–8 of BBAN8 digits
United Kingdom (GB)Characters 1–6 of BBAN (sort code)6 digits
Spain (ES)Characters 1–4 of BBAN4 digits

The bank code and the BIC/SWIFT code are related but not the same thing. BIC codes identify bank locations as a complement to the IBAN's domestic bank account identifier. You need both for a complete international payment instruction.


How the IBAN structure places the bank code within the BBAN

An IBAN contains up to 34 alphanumeric characters: a 2-character country code, 2 check digits, and then the BBAN, which carries all the domestic account information. The BBAN is where the bank code, branch code, and account number all live, packed into a fixed-length string whose internal layout varies by country.

Close-up of hands holding bank document with IBAN details

Think of the IBAN as an envelope and the BBAN as the address inside. The envelope format is universal. The address format inside follows local conventions. Each country's BBAN layout specifies the exact positions and lengths of the bank code, branch code, and account number, and those rules are set by national standards bodies, not by any single international authority.

The distinction between bank code and branch code trips up a lot of people. The bank code identifies the institution. The branch code identifies a specific office or branch of that institution. In the UK, what sits in the BBAN is a 6-digit sort code that functions as a combined bank-and-branch identifier. In Germany, the 8-digit Bankleitzahl (BLZ) identifies the bank directly, with no separate branch code in the IBAN. France separates them: 5 digits for the bank code, then 5 digits for the branch code (code guichet), then the account number, then a 2-digit national check key. The BBAN segment contains bank code, branch code, and account number, and understanding which is which requires knowing the country's specific format.

Infographic showing bank code extraction steps

CountryBBAN ComponentsBank Code LengthBranch Code LengthAccount Number Length
Germany (DE)Bank code + account number8 digitsNone10 digits
France (FR)Bank code + branch code + account + check key5 digits5 digits11 digits
United Kingdom (GB)Sort code + account number6 digits (sort code)Embedded in sort code8 digits
Poland (PL)Bank code + account number8 digitsNone
Spain (ES)Bank code + branch code + check digits + account4 digits4 digits10 digits

A few things worth noting about the US context: the United States does not issue IBANs for domestic accounts. US banks use routing transit numbers for local transactions, which serve a similar purpose to the bank code within an IBAN but operate under a completely different numbering system. When a foreign bank sends a wire to a US account, the US routing number typically appears in the SWIFT message fields rather than inside an IBAN.

Pro Tip: When parsing an IBAN programmatically, always load the country's BBAN format specification first. Hard-coding a fixed offset for the bank code will break as soon as you encounter a country with a different layout.


How IBAN validation works, and why it doesn't confirm the bank code

IBAN validation uses a MOD-97 checksum algorithm. The MOD-97 operation converts letters to numbers and verifies the mathematical integrity of the entire IBAN string. The process works like this: move the first four characters to the end of the string, replace each letter with its numeric equivalent (A=10, B=11, and so on through Z=35), then divide the resulting number by 97. A valid IBAN produces a remainder of 1.

The check digits at positions 3 and 4 are calculated to make that remainder come out to 1. They exist to catch data entry errors, not to confirm that the account is real or that the bank code points to an active institution. A typo that changes one digit will almost always produce a remainder other than 1, flagging the IBAN as structurally invalid. But a correctly formatted IBAN with a valid checksum can still reference a bank that no longer exists, an account that was closed, or a recipient who is not who you think they are.

Here is what structural IBAN validation actually confirms, and what it does not:

  • Confirms: The country code is a recognized ISO 3166-1 alpha-2 code.
  • Confirms: The IBAN length matches the expected length for that country.
  • Confirms: The check digits pass the MOD-97 test.
  • Does not confirm: The bank code refers to an active, licensed institution.
  • Does not confirm: The account number exists within that bank.
  • Does not confirm: The account holder matches the name you have on file.

Concurrent validation of the BIC/SWIFT code is necessary for correctly routing international payments. An IBAN tells you where an account lives in a domestic numbering system. The BIC tells the correspondent banking network which institution to route the funds to. Skipping the BIC check is one of the most common reasons international wires get delayed or returned.


Common mistakes when extracting and using bank codes from IBANs

The most frequent error is assuming the bank code always starts at position 5 of the IBAN and runs for a fixed number of characters. It does start at position 5 in most countries, but the length varies widely, and some countries interleave the bank code with other fields in ways that are not obvious from looking at the string. Treating every IBAN like a German one will produce wrong results for French, Spanish, or Turkish accounts.

Confusing the branch code with the bank code is the second most common problem. In France, characters 5–9 of the IBAN are the bank code, and characters 10–14 are the branch code. Pulling the wrong segment and presenting it as the bank identifier will point to the wrong institution entirely. The same confusion arises with the UK sort code, which encodes both bank and branch in a single 6-digit field. Splitting it incorrectly gives you neither a clean bank code nor a clean branch code.

Finance team discussing bank code errors in meeting

A third mistake is treating a mathematically valid IBAN as proof that the account is active. A valid IBAN structure does not guarantee the existence of an account or the identity of the intended recipient. Cross-checking with live bank directories or a verification service is required before sending funds. This is especially true for high-value transfers, where a misdirected payment can be difficult or impossible to recover.

Online IBAN lookup tools vary in quality. Many derive bank codes from static databases that may not reflect current bank directories for smaller or regional institutions. For routine low-value payments, a well-maintained lookup tool is usually sufficient. For large transactions or payments to less common countries, always confirm the bank code directly with the recipient or through their bank. Entering an incorrect IBAN can result in transfer charges, returned payments, or permanent fund loss.

Pro Tip: Before sending any high-value international wire, ask the recipient to confirm their IBAN and BIC in writing, then run both through an official registry or a real-time verification service. A 30-second check is far cheaper than a wire recall.


Why US finance professionals need to understand IBAN bank codes

The United States does not use IBANs for domestic transactions. US banks rely on routing transit numbers for ACH and wire transfers within the country. A 9-digit ABA routing number identifies the bank and sometimes the branch, serving roughly the same purpose as the bank code within an IBAN, but the two systems are entirely separate and not interchangeable.

The gap matters the moment a US company or individual sends or receives money internationally. When a US business pays a European supplier, the supplier's bank account details will almost always include an IBAN. The US payer needs to read that IBAN correctly, extract the bank code if required by their payment platform, and pair it with the correct BIC/SWIFT code. Getting either wrong delays the payment or triggers a return.

Here is when US finance professionals specifically need to understand IBAN bank codes:

  • Paying European suppliers or contractors. SEPA countries require IBANs for all euro-denominated transfers, and many payment platforms ask for the bank code separately.
  • Receiving payments from abroad. Some foreign banks ask for a US account's routing number formatted as part of an IBAN-like string, which requires understanding how the two systems map to each other.
  • Validating supplier banking details. Accounts payable teams onboarding international vendors need to confirm that the IBAN provided is structurally valid and that the bank code within it corresponds to a real institution.
  • Fraud prevention. Business email compromise (BEC) fraud frequently involves substituting a legitimate IBAN with one that passes format checks but routes funds to a fraudulent account. Knowing how to read the bank code is the first step in spotting a substitution.
  • Regulatory compliance. Cross-border payments from US entities to SEPA countries increasingly fall under the EU Instant Payments Regulation, which requires payee verification before funds are released.

US routing numbers and IBAN bank codes are conceptually similar but structurally incompatible. A routing number cannot be inserted into an IBAN's BBAN field and vice versa. For international property purchases or other large cross-border transfers, US buyers working with foreign banks will always encounter IBANs and need to verify the embedded bank code before wiring funds.


Real-time IBAN verification goes further than format checks

Structural IBAN validation, including MOD-97 and bank code extraction, tells you the account number is formatted correctly. It does not tell you whether the account is active, whether the bank code points to a real institution today, or whether the account holder's name matches the person you intend to pay. Real-time verification fills that gap by checking the IBAN against live payment network data and matching it to the account holder's name.

Vopify is built specifically for this. It takes a name and an IBAN, queries live payment networks across multiple countries, and returns a match result in under two seconds. The platform has processed over 10,000 verifications and covers 20 Eurozone countries, with support also extending to India, Indonesia, South Korea, and China (Alipay). For finance teams running high volumes, bulk IBAN verification via CSV upload lets you check an entire supplier list in one pass rather than one account at a time.

The benefits for finance professionals go well beyond catching typos:

  • Fraud reduction. Matching the IBAN to the account holder's name catches BEC fraud attempts where a valid-looking IBAN is substituted for the legitimate one.
  • Payment accuracy. Confirming the bank code corresponds to an active institution before sending reduces returned wires and the fees that come with them.
  • Regulatory compliance. The EU Instant Payments Regulation requires payee verification for SEPA transfers. Vopify's Verification of Payee service is built to meet that requirement.
  • Operational efficiency. Automated verification at onboarding catches bad account details before they enter your payment system, not after a wire fails.

Valid IBANs support extraction of bank codes and BIC codes for over 40 countries using official registries, but a static lookup only tells you what the registry says. A live verification service tells you what the bank says right now. For finance teams managing international supplier payments, that difference is the one that prevents a misdirected wire from becoming a recovery problem.


How IBANs are used in the United States

The US sits outside the IBAN system for domestic banking. No US bank issues IBANs for accounts held in the United States, and the Federal Reserve does not recognize the IBAN format as a domestic payment standard. US domestic transfers use ABA routing numbers for ACH and Fedwire, and SWIFT BIC codes for international correspondent banking.

That said, US banks and their customers interact with IBANs constantly in the context of cross-border payments. When a US company wires funds to a bank account in Germany, France, the UK, or any of the other IBAN-adopting countries, the beneficiary's account details will be expressed as an IBAN. The US sending bank passes that IBAN through the SWIFT network, where it is used by the receiving bank to credit the correct account.

Some US banks have experimented with assigning pseudo-IBANs to US accounts to simplify inbound international wires. These are not official IBANs issued under the ISO 13616 standard; they are bank-specific formatting conventions that wrap a US routing number and account number into an IBAN-like string. Recipients of these pseudo-IBANs should treat them with caution and confirm directly with the issuing bank that the format is accepted by the sending institution abroad.

For US-based accounts payable teams, the practical implication is straightforward. Domestic payments never require IBAN knowledge. The moment a payment crosses a border into IBAN territory, the team needs to collect a valid IBAN from the payee, verify the bank code within it corresponds to the correct institution, and pair it with the right BIC/SWIFT code. Running that verification through a service like Vopify's IBAN verification platform closes the gap between format validity and actual account ownership, which is the check that matters before funds leave the account.


Verify before you send: Vopify makes IBAN verification instant

https://vopify.io

Knowing how to read the bank code from an IBAN is the foundation. Confirming that the IBAN actually belongs to the person or business you intend to pay is the step that prevents fraud and misdirected wires. Vopify does both in under two seconds, matching the IBAN and account holder name against live payment networks across 20 Eurozone countries and beyond.

Finance teams can run single verifications through the dashboard or upload entire supplier lists via CSV for bulk checks. No lengthy contracts, no integration required to get started. For teams that need programmatic access at high volume, API integration is on the roadmap.

Verify IBANs and payee names instantly with Vopify and stop relying on format checks alone.


Key Takeaways

The bank code from an IBAN sits inside the BBAN segment starting at character position 5, but its exact length and layout depend on the country's national format specification.

PointDetails
Bank code location in IBANThe bank code starts at position 5 of every IBAN, inside the BBAN, but its length varies by country.
Country-specific formatsFrance uses a 5-digit bank code; Germany and Poland each use 8 digits; the UK encodes bank and branch in a 6-digit sort code.
MOD-97 validates format onlyCheck digits confirm the IBAN string is correctly formed but do not verify that the bank code or account is active.
US uses routing numbers, not IBANsThe US has no domestic IBAN standard; routing transit numbers serve the equivalent function for domestic transfers.
Real-time verification closes the gapFormat validation alone is insufficient; live payee verification confirms the IBAN matches the intended account holder before funds are sent.