benni@hamburg: ~ — zsh ● online
benni@hamburg:~$ whoami

Benjamin Dreier_

builds tiny APIs that do exactly one thing well, then stop.

← cd ../tools
benni@hamburg:~$ man iban

IBAN Validator live

Validates an IBAN's structure and checksum (ISO 13616 / mod-97). No, it won't tell you if there's money in it.

// try it
// response
// response appears here
GET /v1/validate https://iban.benjamin-dreier.de
// parameters
iban* text IBAN (spaces and lower-case are fine) DE89 3704 0044 0532 0130 00
// example request
curl 'https://iban.benjamin-dreier.de/v1/validate?iban=DE89+3704+0044+0532+0130+00'
// example response
{
  "iban": "DE89370400440532013000",
  "valid": true,
  "country_code": "DE",
  "check_digits": "89",
  "bban": "370400440532013000",
  "formatted": "DE89 3704 0044 0532 0130 00",
  "length": 22,
  "expected_length": 22
}

OpenAPI spec → — drop it into your own client or codegen.

// what is iban

The IBAN Validator checks whether an International Bank Account Number is structurally valid: the right length for its country and a correct mod-97 checksum (ISO 13616). Paste an IBAN — spaces and lower-case are fine — and it tells you whether the number is plausible and returns the country code, check digits, the BBAN, and a neatly grouped format for display.

What it can't do is tell you the account exists or has money in it — structural validation is the ceiling without a live line into the banking system. That's exactly the point, and it makes a good fit for form validation, cleaning up imported payment data, or catching a fat-fingered digit before it becomes a failed transfer. I wrote up the story and the mod-97 math in this post.

// what comes back
valid the headline result: true or false
reason why it failed (present only when invalid)
country_code the leading two letters, e.g. DE
check_digits the two-digit checksum
bban the country-specific account part
formatted grouped into blocks of four for display
length / expected_length actual vs. required length for the country
// examples
DE89370400440532013000 a valid German IBAN
GB29NWBK60161331926819 a valid UK IBAN
FR1420041010050500013M02606 a valid French IBAN (letters in the BBAN)
de89 3704 0044 0532 0130 00 spaces and lower-case are accepted
DE00000000000000000000 right length, checksum fails → valid: false
DE8937040044 too short for DE → length mismatch
STATUS: busy LOCATION: Hamburg, DE MAIL: hello@bendre.org FUEL: ▓▓▓▓░ energy drink