Part of the IBAN Suite service. One request turns a domestic bank code and account number into the IBAN, verifies the national check digits where the country has them, and identifies the bank with its BIC and address. 57 countries are supported; each has its own set of input fields, listed in the countries table together with a working example and the IBAN it produces.
https://api.iban.com/clients/api/calc-api.phphttps://api.iban.com/clients/api/calc-api.php?api_key=YOUR_API_KEY&format=json&country=FR&bankcode=30006&branch=00001&account=1234567890189application/x-www-form-urlencoded; GET takes the same parameters in the query string. Both methods return the same response, and the parameters may be split between them.error member with a message. Test for error first.Content-Type follows the format parameter.YOUR_API_KEY:curl "https://api.iban.com/clients/api/calc-api.php" -d api_key=YOUR_API_KEY -d format=json -d country=FR -d bankcode=30006 -d branch=00001 -d account=1234567890189The full response to this request is in the Response section; the same request in six more languages is under Example request.
api_key and country are always needed, and account for every country except when a RIB is sent. Which of the others a country uses, and what goes into them, is in the countries table.
| Parameter | Required | Value | Description |
|---|---|---|---|
api_key | yes | string | Your personal key, shown under API Access. |
format | no | json (default) or xml | Response format, lower case. Any other value, including JSON in upper case, returns an HTML Page not found! page with HTTP 200. For BR, CY, EG, HR, IL, IS and RS the response is JSON even when xml is requested. |
country | yes | ISO 3166-1 alpha-2, upper case | Country of the account: FR, DE, GB. Lower case is not accepted for most countries. The countries table lists the 57 supported countries. |
bankcode | per country | string | National bank identifier: BLZ, sort code, clearing number, ABI, ISPB, a 4-letter bank code… The table says what each country expects. Spaces and dashes are removed. Not used by countries whose account number already contains the bank (BA, EE, FI, HU, MA, MK, NO, RS, TN); optional for PL. |
branch | per country | string | Branch identifier for the countries whose account structure has one: BR, ES, FR, IL, IT, JO, MC, MR, PT, SM. |
account | yes, unless rib is sent | string | Domestic account number. Where the table says up to, a shorter value is padded with leading zeros; a field with a fixed length (GB, IE, NO…) must be sent complete. Keep letters where the country uses them (CH, FR, MC, IT…). Spaces are removed. Send it as a string: leading zeros matter. |
cd | per country | string, 2 digits | National check digits: Spain (dígitos de control) and Portugal (NIB check) require them; Belgium accepts them and computes them when omitted. Always two digits (07, not 7). |
prefix | no | string, up to 6 digits | Account prefix for CZ and SK (předčíslí / predčíslie). Omit when the account has none; zeros are padded. |
rib | FR | string, 23 characters | France only: the complete RIB (bank 5, branch 5, account 11, key 2) instead of bankcode, branch and account. Spaces are removed. When rib is sent, the three fields are ignored. For Monaco send the three fields. |
acc_type | IS | string, 2 digits | Icelandic account type (höfuðbók), e.g. 12 or 26. |
kennitala | IS | string, 10 digits | Icelandic national identification number of the account holder. Required for Iceland; it becomes the last ten characters of the IBAN. |
Every example below was run against the API and returned the IBAN shown. Copy the query, add api_key and format, and you have a working request for that country. Where a field says up to, shorter values are padded with leading zeros.
| Country | Code | Parameters | Example request | IBAN returned |
|---|---|---|---|---|
| Andorra | AD | bankcode – bank and branch code together, 8 digitsaccount – up to 12 characters | country=AD&bankcode=00080001&account=1234567890 | AD1400080001001234567890 |
| Austria | AT | bankcode – Bankleitzahl, 5 digitsaccount – Kontonummer, up to 11 digits | country=AT&bankcode=12000&account=52700357958 | AT401200052700357958 |
| Bahrain | BH | bankcode – bank code, 4 letters (an 8- or 11-character BIC is accepted)account – up to 14 characters | country=BH&bankcode=CITI&account=1077181611 | BH02CITI00001077181611 |
| Belgium | BE | bankcode – first 3 digits of the account numberaccount – next 7 digitscd – last 2 digits; optional, computed when omitted | country=BE&bankcode=250&account=0135106&cd=70 | BE60250013510670 |
| Bosnia and Herzegovina | BA | account – full domestic account number, 16 digits | country=BA&account=3380002210018390 | BA393380002210018390 |
| Brazil | BR | bankcode – ISPB code, 8 digitsbranch – agência, 4 or 5 digitsaccount – conta, 10 digits, followed by the account type letter and the owner digit, e.g. 0009795493C1 | country=BR&bankcode=00000000&branch=00001&account=0009795493C1 | BR5100000000000010009795493C1 |
| Croatia | HR | bankcode – vodeći broj, 7 digitsaccount – broj računa, 10 digits | country=HR&bankcode=2360000&account=1101234565 | HR1723600001101234565 |
| Cyprus | CY | bankcode – bank code and branch code together, 8 digitsaccount – up to 16 characters | country=CY&bankcode=00200195&account=357001234567 | CY21002001950000357001234567 |
| Czech Republic | CZ | bankcode – bank code, 4 digitsprefix – account prefix, up to 6 digits; optionalaccount – up to 10 digits | country=CZ&prefix=51&account=1707230277&bankcode=0100 | CZ8001000000511707230277 |
| Denmark | DK | bankcode – registration number, 4 digitsaccount – up to 10 digits | country=DK&bankcode=2000&account=123456789 | DK9520000123456789 |
| Dominican Republic | DO | bankcode – bank code, 4 lettersaccount – up to 20 digits | country=DO&bankcode=ACAU&account=123456789 | DO22ACAU00000000000123456789 |
| Egypt | EG | bankcode – bank code and branch code together, 8 digitsaccount – up to 17 digits | country=EG&bankcode=00190005&account=00000000263180002 | EG380019000500000000263180002 |
| El Salvador | SV | bankcode – bank code, 4 lettersaccount – up to 20 digits | country=SV&bankcode=ACAT&account=123123 | SV43ACAT00000000000000123123 |
| Estonia | EE | account – full domestic account number, up to 14 digits | country=EE&account=55000005511439 | EE525555000005511439 |
| Faroe Islands | FO | bankcode – registration number, 4 digitsaccount – up to 10 digits | country=FO&bankcode=6460&account=0001631634 | FO6264600001631634 |
| Finland | FI | account – tilinumero, 8 to 14 digits; the short form is expanded | country=FI&account=52900261901092 | FI8452900261901092 |
| France | FR | bankcode – code banque, 5 digitsbranch – code guichet, 5 digitsaccount – numéro de compte, 11 characters, optionally followed by the 2-digit clé RIBrib – alternative: the whole 23-character RIB instead of the three fields above | country=FR&bankcode=30006&branch=00001&account=1234567890189 | FR7630006000011234567890189 |
| Germany | DE | bankcode – Bankleitzahl, 8 digitsaccount – Kontonummer, up to 10 digits | country=DE&bankcode=37010050&account=399509 | DE57370100500000399509 |
| Greece | GR | bankcode – bank code and branch code together, 7 digitsaccount – up to 16 characters | country=GR&bankcode=0810001&account=1234567890 | GR9608100010000001234567890 |
| Greenland | GL | bankcode – registration number, 4 digitsaccount – up to 10 digits | country=GL&bankcode=6471&account=0001000206 | GL8964710001000206 |
| Guatemala | GT | bankcode – bank code, 4 lettersaccount – up to 20 characters | country=GT&bankcode=AGRO&account=1234567890 | GT20AGRO00000000001234567890 |
| Hungary | HU | account – bankszámlaszám, 16 or 24 digits | country=HU&account=107000240416330551100005 | HU11107000240416330551100005 |
| Iceland | IS | bankcode – bank and branch, 4 digitsacc_type – account type, 2 digitsaccount – account number, 6 digitskennitala – national identification number, 10 digits | country=IS&bankcode=0001&acc_type=12&account=123456&kennitala=3108962099 | IS750001121234563108962099 |
| Ireland | IE | bankcode – national sort code, 6 digitsaccount – account number, 8 digits | country=IE&bankcode=905838&account=71924374 | IE42BOFI90583871924374 |
| Israel | IL | bankcode – bank number, 3 digitsbranch – branch number, 3 digitsaccount – up to 13 digits | country=IL&bankcode=010&branch=800&account=12612345 | IL170108000000012612345 |
| Italy | IT | bankcode – ABI, 5 digitsbranch – CAB, 5 digitsaccount – conto corrente, up to 12 characters | country=IT&bankcode=02008&branch=30545&account=000103685854 | IT27K0200830545000103685854 |
| Jordan | JO | bankcode – bank code, 4 lettersbranch – branch code, 4 digitsaccount – up to 18 characters | country=JO&bankcode=ARAB&branch=1100&account=1234567890 | JO27ARAB1100000000001234567890 |
| Kuwait | KW | bankcode – bank code, 4 lettersaccount – up to 22 characters | country=KW&bankcode=CBKU&account=1234560101 | KW81CBKU0000000000001234560101 |
| Latvia | LV | bankcode – bank code, 4 letters (an 8- or 11-character BIC is accepted)account – up to 13 characters | country=LV&bankcode=HABA&account=12345678910 | LV97HABA0012345678910 |
| Liechtenstein | LI | bankcode – clearing number, 5 digitsaccount – up to 12 characters | country=LI&bankcode=08810&account=0418650028 | LI9808810000418650028 |
| Lithuania | LT | bankcode – bank code, 5 digitsaccount – account number, 11 digits | country=LT&bankcode=10100&account=12345678901 | LT601010012345678901 |
| Luxembourg | LU | bankcode – bank code, 3 digitsaccount – up to 13 characters | country=LU&bankcode=001&account=01234567891 | LU120010001234567891 |
| Malta | MT | bankcode – sort code, 5 digitsaccount – up to 18 characters | country=MT&bankcode=07113&account=199008240010 | MT40MBWM07113000000199008240010 |
| Mauritania | MR | bankcode – bank code, 5 digitsbranch – branch code, 5 digitsaccount – account number, 11 digits | country=MR&bankcode=00012&branch=00001&account=00000078326 | MR1300012000010000007832637 |
| Moldova | MD | bankcode – bank code, 2 lettersaccount – up to 18 characters | country=MD&bankcode=EX&account=1234567 | MD21EX000000000001234567 |
| Monaco | MC | bankcode – code banque, 5 digitsbranch – code guichet, 5 digitsaccount – numéro de compte, 11 characters, optionally followed by the 2-digit clé RIB | country=MC&bankcode=30002&branch=03260&account=0000079112A | MC3930002032600000079112A59 |
| Morocco | MA | account – RIB, 24 digits | country=MA&account=001810007800020110620318 | MA64001810007800020110620318 |
| Netherlands | NL | bankcode – bank code, 4 lettersaccount – rekeningnummer, up to 10 digits | country=NL&bankcode=ABNA&account=0417164300 | NL91ABNA0417164300 |
| North Macedonia | MK | account – full domestic account number, 15 digits | country=MK&account=200002785123453 | MK07200002785123453 |
| Norway | NO | account – kontonummer, 11 digits including the register number | country=NO&account=96803502045 | NO1996803502045 |
| Pakistan | PK | bankcode – bank code, 4 letters (an 8-character BIC is accepted)account – up to 16 characters | country=PK&bankcode=HABBPKKA&account=39551148771 | PK62HABB0000039551148771 |
| Poland | PL | account – NRB, 26 digitsbankcode – alternative: bank and branch code, 8 digits, with the 16-digit account in account | country=PL&bankcode=11402004&account=0000360275244226 | PL02114020040000360275244226 |
| Portugal | PT | bankcode – banco, 4 digitsbranch – balcão, 4 digitsaccount – conta, 11 digitscd – NIB check digits, 2 digits | country=PT&bankcode=0035&branch=0000&cd=98&account=39551148771 | PT50003500003955114877198 |
| Qatar | QA | bankcode – bank code, 4 lettersaccount – up to 21 characters | country=QA&bankcode=QNBA&account=693123456 | QA54QNBA000000000000693123456 |
| Russia | RU | bankcode – BIK, 9 digitsaccount – account number, 20 digits | country=RU&bankcode=044525600&account=40702810412345678901 | RU0204452560040702810412345678901 |
| San Marino | SM | bankcode – ABI, 5 digitsbranch – CAB, 5 digitsaccount – up to 12 characters | country=SM&bankcode=03034&branch=09800&account=000060164676 | SM38E0303409800000060164676 |
| Saudi Arabia | SA | bankcode – bank code, 2 digitsaccount – up to 18 characters | country=SA&bankcode=20&account=1234567891234 | SA4420000001234567891234 |
| Serbia | RS | account – full domestic account number, 18 digits | country=RS&account=260005601001611379 | RS35260005601001611379 |
| Slovakia | SK | bankcode – kód banky, 4 digitsprefix – predčíslie, up to 6 digits; optionalaccount – up to 10 digits | country=SK&account=4110053902&bankcode=3100 | SK6031000000004110053902 |
| Slovenia | SI | bankcode – bank code, 5 digitsaccount – account number, 10 digits | country=SI&bankcode=33000&account=0000102423 | SI56330000000102423 |
| Spain | ES | bankcode – entidad, 4 digitsbranch – oficina, 4 digitscd – dígitos de control, 2 digitsaccount – cuenta, 10 digits | country=ES&bankcode=0081&branch=1731&cd=91&account=0006040912 | ES5800811731910006040912 |
| Sweden | SE | bankcode – clearingnummer, 4 digits, or 5 for Swedbank (a dash is allowed)account – kontonummer, 7 to 10 digits | country=SE&bankcode=5000&account=1000004 | SE4850000000050001000004 |
| Switzerland | CH | bankcode – clearing number (IID), 4 or 5 digitsaccount – up to 12 characters | country=CH&bankcode=0240&account=240C08011570 | CH6900240240C08011570 |
| Tunisia | TN | account – RIB, 20 digits | country=TN&account=03104071011500451183 | TN5903104071011500451183 |
| Ukraine | UA | bankcode – MFO, 6 digitsaccount – up to 19 characters | country=UA&bankcode=305299&account=2990004149123456789 | UA903052992990004149123456789 |
| United Arab Emirates | AE | bankcode – bank code, 3 digitsaccount – up to 16 digits | country=AE&bankcode=009&account=0000000123456789 | AE460090000000123456789 |
| United Kingdom | GB | bankcode – sort code, 6 digits (dashes allowed)account – account number, 8 digits | country=GB&bankcode=090127&account=93496333 | GB90ABBY09012793496333 |
A country not in this table (for example AL, BG, RO, TR or XK) is answered with Country or Bank not supported or Bank Code not found. Use the IBAN Validation API to check IBANs from those countries.
Every example calculates the same French IBAN from bank code 30006, branch 00001 and account 1234567890189; the response is shown in the next section. Replace YOUR_API_KEY with the key from API Access.
curl "https://api.iban.com/clients/api/calc-api.php" \
-d api_key=YOUR_API_KEY \
-d format=json \
-d country=FR \
-d bankcode=30006 \
-d branch=00001 \
-d account=1234567890189For France the three fields can be replaced by the complete RIB:
https://api.iban.com/clients/api/calc-api.php?api_key=YOUR_API_KEY&format=json&country=FR&rib=30006000011234567890189The response is the same except that the rib and zip fields are not included.
A flat object. The first three fields are the ones to read: iban, bic and bank. The response to the example request:
{
"iban": "FR7630006000011234567890189",
"rib": "30006000011234567890189",
"bic": "AGRIFRPP",
"bank": "CREDIT AGRICOLE S A",
"address": "12 PL DES ETATS UNIS",
"city": "MONTROUGE CEDEX",
"zip": "92127",
"country": "FR"
}Which fields come back depends on the country, because each national directory holds different data. Five fields are always there; the rest are listed with the countries that return them. A field without a value is an empty string in JSON and an empty element in XML; treat null the same way.
| Field | Present for | Description |
|---|---|---|
iban | all countries | The calculated IBAN, without spaces. |
bic | all countries | BIC of the bank or branch from the directory: 11 characters, or 8 where the directory holds the head-office BIC only (BR, FR, GT, MA, MC, MR, SE, SV, TN). Empty when the institution has no BIC. |
bank | all countries | Name of the bank or institution. |
address | all countries | Street address of the bank or branch; may be empty. |
city | all countries | City of the bank or branch. |
zip | all except MA, TN | Postal code; may be empty. |
country | 38 countries | ISO 3166-1 alpha-2 code. Not returned for every country and sometimes empty: read the country from the first two characters of the IBAN instead. |
branch | 24 countries | Branch name, where the directory has one (AD, AE, BH, BR, DO, GB, GR, GT, IE, IL, IS, IT, KW, LT, LU, LV, MD, PK, PT, QA, SA, SM, SV, UA); often empty. |
phone, fax, email, website | some countries | Contact details of the bank. The fields are present for AT, BA, BR, CY, DK, EE, EG, ES, FO, GB, GL, GR, HU, IE, IL, IS, JO, MK, NL, NO, RS in varying combinations, but only the United Kingdom returns a value (phone); for the other countries they are empty. |
rib | FR, MC, MR | The 23-character RIB: bank, branch, account and key. Not returned when the request used the rib parameter. |
account, sort_code | GB; account also GR, IS | The account number and sort code as normalised by the API. |
state | IT, SM | Province; may be empty. |
currency | IE | Account currency from the directory. |
details | PL | Reserved; empty. |
The United Kingdom returns the normalised sort code and account number and the branch name:
{
"iban": "GB90ABBY09012793496333",
"account": "93496333",
"sort_code": "090127",
"bank": "Santander UK plc",
"branch": "SANTANDER BANK ACCOUNT",
"bic": "ABBYGB2LXXX",
"address": "Santander Sapien6 - SR43 4ET Santander Domestic Payments ",
"city": "Sunderland",
"zip": "SR43 4ET",
"country": "GB",
"phone": "0800 0851785"
}One member only. The example is Belgium with wrong check digits:
{
"error": "Account number is invalid"
}A wrong or missing key is answered the same way, with the message API Key is invalid (in XML without the declaration line).
Messages are English text and differ by country; there are no numeric codes. Act on the presence of error, and show the message to the user. The messages recorded during testing, grouped by meaning:
| Message | Meaning |
|---|---|
| API Key is invalid | The key is missing or wrong. |
| Country or Bank not supported | The country is not in the table. |
| Required fields not submitted. / Required field is missing. Please enter Bank Code and Account Number | A parameter the country needs is missing (account, branch, country…). |
| Illegal characters submitted | A numeric field contains letters or other characters. |
| Bank Code not found. / Bank not found! / Sort code cannot be found / Bank Code/Branch Code not found. / SortCode / BankCode can not be identified. IBAN can not be calculated. | The bank, branch or sort code is not in the directory, so the IBAN cannot be built. The wording depends on the country. |
| Bank Code invalid. / Bank Code is not valid / Bank Code not valid / bankcode invalid. / BLZ/Bank Code not valid / Bank Code length not correct. Must be 8 digits. | The bank code has the wrong length or form for the country (see the table), or is missing where it is required. |
| Account number is invalid / Account Number is not valid / Account number invalid. / Kontonummer/Account Number is not valid / Account Number checksum is invalid. / Account Number (checksum) is not correct. / Clearingnummer/Account Number is not valid. Check digit incorrect. | The account number fails the national check digit, has the wrong length or form, or the check digits in cd do not match. |
| Account Number has to be 11 characters long / Account Number prefix too long. / Clearingnummer or Account Number too long. | Length rule of the country not met (NO, CZ/SK prefix, SE). |
| Bank Code/ Branch Code (checksum) is not correct. | Spain: cd missing or wrong for the given bank and branch. |
| RIB is not valid | France: the RIB key does not match, a field is missing, or the bank is unknown. |
What each outcome means for your code. A calculation is deterministic for a given input, so there is never a reason to resend one; bank data does change over time, so if you cache responses, give the cache a limited lifetime.
| Situation | Meaning | What to do |
|---|---|---|
| HTTP 200, body is an HTML page | format is not json or xml in lower case. | Fix the parameter. |
error = API Key is invalid | Wrong or missing key. | Stop sending; check the key under API Access. |
error about a missing field, the bank code or the country | The request does not match what the country needs. | Compare with the countries table; do not retry unchanged. |
error about the account number, check digits or RIB | The input fails the national check or length rule. The data is wrong, not the request. | Show the message to the user; do not retry with the same input. |
error about a bank or sort code not found | Input is well-formed but the bank is not in the directory. | Verify the bank code with the account holder; a new bank code may not be in the directory yet. |
| HTTP 429, HTML body | More than 20 requests per second. Rejected before reaching the API: not processed, not charged. | Wait a moment and resend; lower the sending rate. There is no Retry-After header. |
| HTTP 5xx, timeout, connection error | Temporary problem on the way to the API or on the API itself. | Retry with increasing delays (1 s, 2 s, 4 s, then give up and queue). |
iban always carries bank; bic is empty for the few institutions that have none. The IBAN check digits are computed by the API; every returned IBAN passes the ISO 13616 check.country field, which is not present for every country.bic is 8 or 11 characters. If your system needs 11, append XXX to an 8-character value.Each calculation uses one query from your IBAN Suite balance, the same balance as the Validation API. The services endpoint returns every service active on your account with its remaining queries and expiry date; it takes api_key and format and does not use a query. It is documented with a sample response on the Validation API page.
https://api.iban.com/clients/api/v4/services/?api_key=YOUR_API_KEY&format=json| Term | Meaning |
|---|---|
| BBAN | Basic Bank Account Number: the national part of the IBAN after the country code and check digits. This API builds it from the parameters you send and computes the check digits. |
| BLZ | Bankleitzahl, the bank code in Germany (8 digits) and Austria (5 digits). |
| Sort code | Six-digit bank and branch code in the United Kingdom and Ireland (national sort code), often written 09-01-27. Malta uses a five-digit sort code. |
| Clearingnummer / IID | Bank identifier in Sweden (4 digits, 5 for Swedbank) and Switzerland or Liechtenstein (IID, up to 5 digits). |
| RIB | Relevé d’identité bancaire: in France and Monaco the 23-character bank account identifier (code banque 5, code guichet 5, numéro de compte 11, clé RIB 2). Morocco and Tunisia use the same word for their full domestic account numbers. |
| Clé RIB | The two check digits at the end of a French RIB, verified by the API. |
| ABI / CAB | Italian and Sammarinese bank code (Associazione Bancaria Italiana, 5 digits) and branch code (Codice di Avviamento Bancario, 5 digits). The CIN check letter of the IBAN is computed by the API. |
| NIB | Número de Identificação Bancária, the 21-digit Portuguese account identifier: bank 4, branch 4, account 11, check digits 2. |
| CCC | Código Cuenta Cliente, the 20-digit Spanish account identifier: entidad 4, oficina 4, dígitos de control 2, cuenta 10. |
| NRB | Numer Rachunku Bankowego, the 26-digit Polish account number: 2 check digits, 8-digit bank and branch code, 16-digit account. |
| ISPB | Identificador do Sistema de Pagamentos Brasileiro, the 8-digit bank identifier used in Brazilian IBANs (Banco do Brasil is 00000000). |
| MFO | Six-digit bank identifier in Ukraine. |
| BIK | Bankovsky identifikatsionny kod, the 9-digit bank identifier in Russia. |
| Kennitala | Icelandic national identification number (10 digits) of the account holder; part of every Icelandic IBAN. |