Bank Code & Payment Tools

IBAN Format Guide

A reference for IBAN structures country by country: total length, the bank, branch and account segments, the character pattern, the national check digits where they exist, and a synthetic example that is clearly marked as one.

  • Structure table per country
  • Segment map for a sample
  • Notes on national check digits
Runs in your browser

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics.

IBAN formats workspace

1 Pick a country, or explain an IBAN

Common formats:

The bundled subset of the SWIFT IBAN Registry. Countries outside it are not guessed at.

The IBAN stays in this tab. Selecting the country from it is done locally.

2 Structure

What the IBAN Format Guide does

This is a structure reference rather than a validator: for each country it gives the total IBAN length, the character pattern the national account number follows, and what each field of that pattern actually is - bank code, branch code, account number, national check digit. Paste an IBAN and the same table is labelled with your own characters, so you can see which part is the sort code and which is the account.

Every example shown is synthetic. It is the registered pattern filled with a fixed sequence and then given genuine mod-97 check digits, so it demonstrates the arithmetic without being anybody's account. Nothing you paste leaves this tab.

How to use it

  1. Choose a country to see its IBAN length, the registry pattern and the named fields in order.
  2. Or paste an IBAN. The country is read from its first two characters and the field table is filled in with your own values, so you can see exactly where the bank code ends and the account number begins.
  3. Check the 'National check digits' row. Where it says yes, the account number carries its own check digit that the IBAN's mod-97 test does not cover.
  4. Scroll to the full table to compare countries, or export the whole structure list as CSV or JSON for a payment-file mapping document.

Reading the results

The pattern notation comes from the IBAN Registry: 4!a is exactly four capital letters, 6!n exactly six digits, 12!c exactly twelve letters or digits. The exclamation mark means 'exactly', and every IBAN field is fixed length.

The first two characters are always the ISO 3166-1 country code and the next two are always the check digits. Everything after that is national, which is why a German IBAN is 22 characters and a Maltese one 31.

Field names describe what the national scheme calls each part. A British IBAN carries a sort code; a German one carries a Bankleitzahl; a French one carries a code banque, a code guichet and the cle RIB. These are not interchangeable concepts with a common name.

A country missing from the table is missing from the bundled subset, not from the IBAN scheme. The page says so rather than inventing a pattern.

Worked example: reading a French IBAN field by field

FR14 2004 1010 0505 0001 3M02 606 is 27 characters, which is the registered French length, and its national part follows the pattern 5!n5!n11!c2!n.

That splits into 20041 (the code banque, here La Banque Postale), 01005 (the code guichet, the branch), 0500013M026 (the account number, which may contain letters) and 06 (the cle RIB, France's own check digits).

The cle RIB is computed over the bank code, branch code and account number as a mod-97 test of their own, and it is entirely separate from the 14 that follows FR. An IBAN can pass the mod-97 check the page runs and still have a wrong cle RIB, because the two checks cover different things - which is why the tool flags France rather than implying one test covers both.

Formulas and scoring rules

IBAN length
length = 4 + sum of the registry pattern field lengthsFixed per country; the maximum the standard allows is 34 characters.
Pattern notation
<n>!<type> where type is n (digits), a (A-Z) or c (A-Z and 0-9)The ! means the field is exactly that length, never shorter.
Synthetic example
fill the pattern with a fixed sequence, then check = 98 - (numeric(BBAN + country + "00") mod 97)Produces a string that passes validation and is not an account.

Why the national part varies so much

IBAN did not replace national account numbering; it wrapped it. Each country took whatever it already had - a Bankleitzahl and an account number in Germany, a sort code and an account number in the United Kingdom, a Relevé d'Identité Bancaire in France - and registered that layout with a fixed length and a character pattern. That is why there is no common 'branch field' across countries, and why a mapping table that assumes one will corrupt somebody's payment file.

It also explains the letters. Countries whose national numbering allowed letters, such as Italy's CIN or the alphanumeric account numbers in Switzerland and Malta, kept them, so a parser that assumes an IBAN is digits after the first two characters will reject valid numbers.

Using this when you build a payment file

If you are extracting a sort code or a bank code out of an IBAN for a file format that wants them separately, take the offsets from the registry pattern rather than from the number's appearance. British and Irish IBANs both put four BIC letters before the sort code; Dutch ones put four BIC letters straight in front of the account number with no branch field at all.

Store IBANs as text. The single most common corruption in practice is a spreadsheet treating a column of Norwegian or Belgian IBANs as numbers and dropping a leading zero, which produces a string of the wrong length that then fails validation for a reason that has nothing to do with the bank.

Limitations: what the result does not prove

  • This is a structure reference, not a directory. It cannot tell you that a bank code is currently in use, which branch it is, or whether an account exists.
  • The country list is a subset of the SWIFT IBAN Registry, which is the authority and is updated as countries join or change their layouts. Check the registry before relying on a pattern for production code.
  • Field names describe the national scheme's intent. Some countries pack more than one meaning into a field, and a few reserve positions that are always zero.
  • Every example on this page is synthetic. Do not send money to one, and do not treat one as a test account at a real bank.

Privacy: where your data goes

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics. Session recording and tag-manager scripts are switched off on this page.

Standards and sources

Frequently asked questions

How long is an IBAN?

It depends entirely on the country: 15 characters in Norway, 16 in Belgium, 22 in Germany and the United Kingdom, 27 in France and Italy, 31 in Malta. The standard caps it at 34. There is no such thing as a general IBAN length, which is why length alone is a useful first check.

What do the letters n, a and c mean in an IBAN pattern?

They are the IBAN Registry's character classes: n is digits 0-9, a is capital letters A-Z, and c is either. The number before the exclamation mark is the exact field length, so 4!a6!n8!n means four letters, then six digits, then eight digits.

Where is the sort code inside a British IBAN?

Characters 9 to 14, after the two-letter country code, the two check digits and the four letters of the bank's BIC. The eight digits after it are the account number. Paste your IBAN into the box above and the table labels those positions for you.

Why do some IBANs contain letters in the middle?

Because the national account number does. Italy starts its national part with the CIN check letter, Switzerland and Malta allow alphanumeric account numbers, and France's account field can contain letters. Any code that assumes digits after the check digits will reject valid IBANs from those countries.

Can I generate a real IBAN from a bank code and an account number?

You can compute the check digits and assemble the string, and the validator page has a box that does it. Whether the result is a usable account depends on the bank having issued it - the arithmetic is deterministic, the account is not. Banks publish their customers' IBANs precisely so nobody has to derive them.

Which countries use IBANs?

All of the SEPA area plus many others in Europe, the Middle East, North Africa and the Caribbean - well over seventy at the last count. The United States, Canada, Australia, New Zealand, India, China and Japan do not, and use their own routing schemes instead.

Is the BBAN the same as the account number?

No. The BBAN is everything after the four-character IBAN prefix, and it normally contains a bank code and often a branch code as well as the account number. Only in a few countries, such as the Netherlands, is the BBAN close to just the account number.

Why does the table not include my country?

The bundled table is a subset of the registry, so an absent country means it is not bundled here - not that it has no IBAN. The validator will still run the mod-97 check on such an IBAN and will tell you plainly that no length or pattern check was performed.

Last reviewed by the A2Z.Tools team against the sources listed above.

Rate this tool

Was this tool useful? Your feedback helps us improve it.

No ratings yet — be the first to rate this tool.
Your rating (required)
0 / 2000

Please do not include passwords, payment details or other sensitive information.

Your feedback is sent privately to the A2Z.Tools team and will not be posted publicly.