IBAN to BIC: why forms still ask for a SWIFT code you mostly don’t need, and where the answer actually comes from
You are setting up a new supplier. The invoice gives an IBAN, nothing else. The accounting system’s supplier form has a BIC field, marked mandatory, and it won’t save without it. So you search the web for the bank’s name and “SWIFT code”. You find three different answers on three sites full of ads, pick the one that looks most official, and hope.
There is a better way. Most IBANs say which bank holds the account, and the countries that use them publish lists that say which BIC each bank uses. Put the two together and the BIC follows from the IBAN, with a source you can name. This post explains what is inside an IBAN, where those lists come from and what is odd about them, why a mistyped IBAN must never be given a BIC, and when you need a BIC at all. The examples were worked out with the IBAN to BIC finder, which does the lookup for one IBAN or a whole list.
What an IBAN contains, and what it doesn’t
An IBAN is a country’s old domestic account number with an international wrapper. The first two letters are the country, the next two digits are check digits, and the rest (the BBAN) is the account in that country’s own format. Inside that domestic part, almost every country puts a bank code first:
| IBAN | Bank code | What the code is |
|---|---|---|
DE89 3704 0044 0532 0130 00 | 37040044 | A German Bankleitzahl: 8 digits, here Commerzbank in Cologne |
NL91 ABNA 0417 1643 00 | ABNA | A Dutch bank identifier: 4 letters, here ABN AMRO |
HU42 1177 3016 1111 1018 0000 0000 | 11773016 | A Hungarian branch code: bank (117, OTP) and branch together |
FI21 1234 5600 0007 85 | 123 | A Finnish national ID: 3 digits, here Nordea |
What the IBAN doesn’t contain is the BIC. A BIC (Business Identifier Code, the thing everyone calls a SWIFT code) is a separate identifier, issued by SWIFT, made of the bank’s own four letters, a country, a location and sometimes a branch. Commerzbank’s is COBADEFFXXX: COBA for the bank, DE for Germany, FF for Frankfurt, XXX for the head office. Nothing in 37040044 spells COBA. In the Dutch case the bank identifier and the BIC happen to start alike (ABNA and ABNANL2A), which is how Dutch banks chose their identifiers, but you still can’t guess the last four characters. Rabobank’s ends in 2U, not 2A.
The check digits are the other half of an IBAN’s design. Move the first four characters to the end, turn letters into numbers (A is 10, B is 11 and so on), and the whole thing read as one long number must leave a remainder of 1 when divided by 97. For the Dutch example, the same IBAN with check digits 00 leaves a remainder of 7, and 98 − 7 = 91: the check digits are 91. The method (ISO 7064 MOD 97-10) catches every single mistyped character and every swap of two neighbouring ones. That property matters more than it seems, as we’ll see.
Where the BIC comes from: national bank code lists
To turn a bank code into a BIC you need the country’s list of bank codes. Many countries publish an official one, because every payment system in the country runs on it. They come in every format there is: fixed-width text files, CSVs, spreadsheets, JSON and tables on web pages. Some are replaced on a schedule, others whenever a bank opens or closes:
- Germany: about 3,500 bank codes with the BIC for each, in a list replaced four times a year.
- Switzerland and Liechtenstein: one list for both, with every institution identifier (IID).
- The Netherlands: about a hundred banks, each identified by four letters.
- Austria, Belgium, Finland, Norway, Hungary, the Czech Republic, Slovakia, Slovenia, Estonia, Croatia: each country’s own list, in its own format.
That makes fourteen countries. The finder holds all of them, rebuilt by a script, and its guide shows each list’s date. Building them turns up the kind of detail that makes a hand-copied BIC from a random website risky:
- Belgium lists codes nobody has. Its file has a row for every three-digit code from 000 to 999, and over two hundred of them say VRIJ (free) or Onbeschikbaar (unavailable) where the bank’s name would be. Read naively, a typo in a Belgian IBAN would come back as the bank “VRIJ”. The finder drops those rows.
- Slovakia’s page lists Czech banks too. The Slovak list has a second table of Czech banks with their own codes. Taken together, a Slovak IBAN could be matched to a Czech bank. The finder stops at the second table.
- Hungary codes branches, not banks. Its list has over 6,700 entries, because the code in a Hungarian IBAN is bank plus branch. The answer names the branch, while the BIC is the bank’s.
- Swiss branches borrow their head office’s BIC. Many Swiss IIDs are branches with no BIC of their own. The bank master says which head office each belongs to, and that office’s BIC is the right one to use.
- Some banks have no BIC. A few Czech building societies, Estonian lenders and small Belgian institutions are listed with a bank code but no BIC: they are reached through another bank. The finder says the list gives none rather than inventing one.
Why a mistyped IBAN must never get a BIC
Here is the trap in looking up a BIC from a bank code. Take an invented IBAN at Berliner Sparkasse: DE17 1005 0000 0123 4567 89. Its bank code is 10050000, and Germany’s list gives it BIC BELADEBEXXX. Now type the 5 as a 7: DE17 1007 0000 0123 4567 89. The bank code 10070000 is real too. It belongs to Deutsche Bank in Berlin, BIC DEUTDEBBXXX. A lookup that only reads the bank code would confidently hand you the wrong bank’s BIC.
The check digits are what save you. The changed IBAN fails MOD 97, as every single-digit typo does, so the finder calls it invalid and gives no BIC. It does mention that 10070000 would be Deutsche Bank, Berlin, as a clue to where the typo might be, but the answer waits for an IBAN that adds up. That is the rule throughout: validate first, look up second.
For SEPA transfers, a wrong BIC is mostly harmless today, because banks route on the IBAN. But a wrong BIC in a supplier master can travel: into a non-SEPA payment, into an international wire, into the next system that trusts the field. A BIC that came from a valid IBAN and a named list is one you can defend later.
Do you still need a BIC?
Often, no. The EU’s SEPA Regulation (No 260/2012) made the IBAN enough. From February 2014, banks could no longer ask customers for a BIC on domestic euro transfers, and from February 2016 not on cross-border ones within SEPA either. SEPA covers the EU, the rest of the EEA, Switzerland, the UK and a few smaller countries. If your bank’s own transfer form asks for a BIC on a euro payment to a SEPA country, you can usually leave it empty.
You still need one in three situations:
- Payments outside SEPA, or in currencies other than the euro: a dollar wire to a German account still goes through SWIFT, and SWIFT routes on BICs.
- Software that hasn’t caught up: accounting and payroll systems that kept a mandatory BIC field from before 2016, and supplier portals that copy them.
- Payment files in older formats, or for banks that still want the BIC in each record.
When a form insists, the BIC has to come from somewhere, and a national list is a better source than a web search.
Reading a BIC once you have it
A BIC is 8 or 11 characters long:
- 4 letters: the bank (COBA, DEUT, ABNA).
- 2 letters: the country where the bank is registered (DE, NL).
- 2 characters: the location. A 0 in the second place marks a test BIC, and a 1 a passive participant.
- 3 characters, optional: the branch. XXX means the head office.
So COBADEFFXXX and COBADEFF are the same BIC, and forms that want 11 characters take the first and those that want 8 take the second. A BIC ending in something other than XXX, such as BOFSNL21002 in the Dutch list, names one office, and its first eight characters are the bank’s own BIC. The country in a BIC is where the bank is registered, not necessarily where the account is. A handful of entries in the Austrian, Hungarian and Norwegian lists carry a BIC from another country, for banks that serve customers there through a branch abroad. The finder points that out when it happens.
Countries without a list
The big gaps are not technical. The UK maps sort codes to banks in the Extended Industry Sorting Code Directory, which is licensed and sold rather than published. A UK IBAN’s four letters (NWBK in GB29 NWBK 6016 1331 9268 19) identify the bank and usually match the start of its BIC, but the rest of the BIC isn’t in the IBAN, so the finder checks a UK IBAN and stops there. France and Italy publish registers of banks, but none that maps the bank codes inside their IBANs to BICs. Poland publishes one whose server didn’t answer when the finder was built; Ukraine publishes one with no BICs in it; Latvia only in an old spreadsheet format.
For those countries, the BIC has to come from the account holder, from their invoice or letterhead, or from your own bank, which may be able to fill it in from the IBAN.
Practical tips
- Validate before you look up. A BIC from an invalid IBAN is a BIC for whatever bank the typo points at.
- Look up whole files at once. Paste a supplier or payroll list into the finder and download the results as CSV: every row gets its status, BIC and bank, and repeated IBANs are flagged.
- Read the bank name back. If an IBAN from a supplier you know banks with ING comes back as a different bank, ask before paying. Changed bank details in an email are the classic invoice fraud, and a valid IBAN only proves it wasn’t garbled.
- Prefer the list’s form of the BIC. 8 or 11 characters both work when the 11 ends in XXX; a branch BIC is worth keeping when it is the one listed.
- Check the date. Banks merge, and their codes are retired with a successor. The finder flags codes the list marks as closing; a list is only as fresh as its last update.
The BIC field on that supplier form is still there, and it will probably outlive the reason it was added. At least the answer can now come from an official list rather than from the third search result.