IBAN country list
Every country that uses IBAN, with the exact total length in characters. A valid IBAN must match the length of its country, then pass the ISO 13616 mod-97 check.
How the check works
Remove spaces and uppercase the string. Move the four leading characters (country code plus check digits) to the end. Replace each letter with its position in the alphabet plus 9 (A=10, B=11, ... Z=35). Read the result as one huge integer and take it modulo 97: a valid IBAN leaves remainder 1.
That is pure arithmetic, so it needs no bank directory and no network call. Try it on the IBAN reference page or in the browser demo.
curl "https://<your-worker>.workers.dev/v1/validate/iban/DE89370400440532013000"
Lengths by country
77 countries are listed. Country codes not in this table are rejected, because no official IBAN length is defined for them.
| Country | IBAN length |
|---|---|
| AD | 24 |
| AE | 23 |
| AL | 28 |
| AT | 20 |
| AZ | 28 |
| BA | 20 |
| BE | 16 |
| BG | 22 |
| BH | 22 |
| BR | 29 |
| BY | 28 |
| CH | 21 |
| CR | 22 |
| CY | 28 |
| CZ | 24 |
| DE | 22 |
| DK | 18 |
| DO | 28 |
| EE | 20 |
| EG | 29 |
| ES | 24 |
| FI | 18 |
| FO | 18 |
| FR | 27 |
| GB | 22 |
| GE | 22 |
| GI | 23 |
| GL | 18 |
| GR | 27 |
| GT | 28 |
| HR | 21 |
| HU | 28 |
| IE | 22 |
| IL | 23 |
| IQ | 23 |
| IS | 26 |
| IT | 27 |
| JO | 30 |
| KW | 30 |
| KZ | 20 |
| LB | 28 |
| LC | 32 |
| LI | 21 |
| LT | 20 |
| LU | 20 |
| LV | 21 |
| MC | 27 |
| MD | 24 |
| ME | 22 |
| MK | 19 |
| MR | 27 |
| MT | 31 |
| MU | 30 |
| NL | 18 |
| NO | 15 |
| PK | 24 |
| PL | 28 |
| PS | 29 |
| PT | 25 |
| QA | 29 |
| RO | 24 |
| RS | 22 |
| SA | 24 |
| SC | 31 |
| SE | 24 |
| SI | 19 |
| SK | 24 |
| SM | 27 |
| ST | 25 |
| SV | 28 |
| TL | 23 |
| TN | 24 |
| TR | 26 |
| UA | 29 |
| VA | 22 |
| VG | 24 |
| XK | 20 |