IBAN validation API: check the format before you pay
An IBAN validation API checks that the country code is real, the length is right for that country and the two check digits pass the ISO 13616 mod-97 test, which catches almost every typo. It can't confirm that the account exists or who owns it; only the bank or a payee-verification service can. Free options include OpenIBAN, and our IBAN Check API does it for $0.002 with plain-English reasons when a number is wrong.
Try it free IBAN Check API — validate IBANs before you pay · $0.002 / call
What validation actually tests
The mod-97 step is why a single wrong digit or two swapped digits are caught.
- The first two letters are a country that uses IBAN.
- The total length matches that country: 22 characters for Germany and the UK, 27 for France, 18 for the Netherlands.
- Move the first four characters to the end, turn letters into numbers (A=10 to Z=35) and divide by 97. A valid IBAN leaves 1.
Do it yourself in Python
This tests the check digits only. Add a table of country lengths, or you'll accept a number that is too short for its country.
def iban_ok(iban: str) -> bool:
s = iban.replace(" ", "").upper()
moved = s[4:] + s[:4]
digits = "".join(str(int(c, 36)) for c in moved)
return int(digits) % 97 == 1
print(iban_ok("DE89 3704 0044 0532 0130 00")) # True
Free and paid options
| Option | What you get | Limits |
|---|---|---|
| Your own code | Check digits and length | You maintain the country table |
| OpenIBAN | Free validation; bank name and BIC for 7 countries | Bank data for Germany, Austria, Switzerland, Benelux and Liechtenstein only |
| Bank-data vendors | BIC, bank name and branch for many countries | Monthly plans |
| IBAN Check (iamai.markets) | Length, check digits, bank code for 16 countries, reasons | $0.002 per check; no BIC or bank name |
Our API in one call
Send the IBAN with or without spaces. You get valid, country_code, check_digits, the BBAN, the bank code where its position is well known (Germany, UK, Ireland, France, Spain, Italy, Netherlands, Belgium, Austria, Switzerland, Portugal, UAE, Saudi Arabia, Poland, Sweden, Turkey), the IBAN in groups of four, and a problems list. It's pure computation, so it's fast and nothing is stored. Paid per call with x402 in USDC on Base; 5 free tries a day on the listing page.
curl -i -X POST https://iamai.markets/api/x402/services/9z7BlJOqNR0o \
-H "Content-Type: application/json" \
-d '{"iban": "DE89 3704 0044 0532 0130 00"}'
# result: iban, valid, country_code, check_digits, bban, bank_code, formatted, problems
What validation won't stop
A fraudster can send a perfectly valid IBAN for their own account. Payment fraud is stopped by confirming changes of bank details through a known phone number, and by payee-name checks where your bank offers them, such as Confirmation of Payee in the UK or Verification of Payee in the euro area.
The product
Questions
Can an IBAN API tell me the account holder's name?
No. Holder names are only checked by banks, through payee-verification services.
Does your API return the BIC (SWIFT code)?
No. It returns the bank code inside the IBAN for 16 countries, not the BIC or the bank's name.
Are US account numbers IBANs?
No. The US doesn't use IBAN; American accounts use a routing number and an account number.
Related
Updated 2026-12-02
