curatedapi

IBAN check

Check an IBAN's country, length, structure and check digits against the SWIFT IBAN registry, and say exactly what is wrong.

The IBAN to check. Spaces, dots, hyphens and slashes are ignored, and lower-case letters are read as upper case. At most 64 characters.

Examples

Result: Too short for the country

Valid
Whether the IBAN passes every check.
no
Normalized
The number as it was checked: separators removed, letters in upper case.
NL91ABNA04171643
Problem
What is wrong, when valid is false: CHARACTERS: a character that cannot appear in this kind of number; LENGTH: the wrong number of characters; COUNTRY: an unknown or unsupported country code; FORMAT: the right length but the wrong structure; CHECK_DIGIT: the check digit or check characters do not match the rest of the number.
LENGTH
Message
The result in a sentence, naming the rule that failed.
An IBAN from Netherlands has 18 characters; this one has 16.
Country
The ISO 3166 country code.
NL
Country name
The country's name in the registry.
Netherlands

Calculator check/iban@1.

How it is calculated

move the first four characters to the end, read A as 10 … Z as 35, and the number must leave remainder 1 when divided by 97; check digits = 98 − (BBAN + country + 00) mod 97

Checks an International Bank Account Number the way ISO 13616 defines it: the country code must be in the SWIFT IBAN registry, the length and the structure of the account part (BBAN) must be the ones registered for that country, and the two check digits must be the ones MOD 97-10 gives. When a check fails, the answer names it, and for a wrong check digit it gives the digits the rest of the number calls for.

  • The number is checked by arithmetic alone. Nothing is looked up, so a valid result means the number is well formed, not that the account, company or security exists.
  • 89 countries are covered, as registered in release 103 (September 2026) of the SWIFT IBAN registry.
  • Check digits 00, 01 and 99 are never valid: ISO 13616 only produces 02 to 98.
  • Some countries put a second, national check digit inside the account part (Belgium, France, Italy, Spain and others). Those are not checked.

References

Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.

Use it from your code

POST /v1/calc/check/ibanVersion 1
curl https://api.curatedapi.com/v1/calc/check/iban \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "NL91 ABNA 0417 1643"
  }'
The same call in Python
import os

import requests

payload = {
    "number": "NL91 ABNA 0417 1643",
}
response = requests.post(
    "https://api.curatedapi.com/v1/calc/check/iban",
    headers={"Authorization": f"Bearer {os.environ['CURATEDAPI_KEY']}"},
    json=payload,
    timeout=10,
)
print(response.json()["result"])
The same call in JavaScript
const payload = {
    "number": "NL91 ABNA 0417 1643",
};
const response = await fetch("https://api.curatedapi.com/v1/calc/check/iban", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CURATEDAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});
console.log((await response.json()).result);

MCP tool calc_check_iban at https://mcp.curatedapi.com. Inputs, outputs and errors in the API reference.

Put it on your website

<div data-curatedapi-widget="check/iban" data-key="capi_public_…"></div>
<script src="https://widgets.curatedapi.com/v1/widget.js" async></script>

Use a public key registered for your site. Calculations are billed like API calls. How widgets work.

Related calculators

Add this calculator to your website

Paste two lines into your page and your visitors get this calculator. Each use counts as one call on your plan, the same as the API.

Free for up to 1,000 uses a month. 50,000 uses a month cost $9.00 on the Starter plan.