Skip to content
TypeParser
All tools

IBAN Validator

Validate and decode IBAN account numbers.

beats iban.com edge: Decoded breakdown + checksum
IBAN
enter IBAN
Guide

About IBAN Validator

Validate IBAN account numbers via the standard mod-97 checksum. Decode country, bank code, branch code, account number from a single paste. Catch typos before they cost a wire transfer fee. All validation runs locally — your IBAN never reaches a server.

What an IBAN encodes

International Bank Account Number — a single string identifying a bank account anywhere in the IBAN-using world. Format:

DE 89  3704 0044  0532 0130 00
│  │   │             │
│  │   bank code     account number
│  check digits
country code

The check digits make the whole string self-validating via mod-97 — a wrong character almost certainly fails the checksum.

What this tool does

  1. Strip whitespace.
  2. Validate length matches the country’s IBAN format (each country has a fixed length).
  3. Compute mod-97 over the rearranged numeric form.
  4. Decode country, bank code, branch code, account number using the country’s specific layout.

If valid, you get a clean breakdown. If invalid, the tool tells you why — checksum failed, length wrong, country not recognized.

IBAN length by country

Each country fixes its IBAN length; a mismatch is an instant fail even before mod-97:

CountryCodeLength
GermanyDE22
United KingdomGB22
FranceFR27
IrelandIE22
MaltaMT31
PakistanPK24
BrazilBR29
NorwayNO15

The tool carries the full ISO 13616 registry, so bank-specific checks (HSBC, Nordea, Askari, HBL, Bank Alfalah, Bank of Valletta) reduce to “does this string match the country’s format and checksum” — the issuing bank does not change the validation rule.

Validating an IBAN in code

The mod-97 check is short enough to inline:

$iban = strtoupper(preg_replace('/\s+/', '', $iban));
$rearranged = substr($iban, 4) . substr($iban, 0, 4);
$numeric = preg_replace_callback('/[A-Z]/', fn($m) => ord($m[0]) - 55, $rearranged);
$valid = bcmod($numeric, '97') === '1';                    // PHP
const s = iban.replace(/\s+/g, "").toUpperCase();
const r = (s.slice(4) + s.slice(0, 4)).replace(/[A-Z]/g, c => c.charCodeAt(0) - 55);
let rem = 0; for (const d of r) rem = (rem * 10 + +d) % 97;
const valid = rem === 1;                                    // JavaScript, overflow-safe

For Angular, wrap that in a Validator; for production, ibantools also checks per-country length and structure. This tool does all of it locally — paste to verify before you ship the regex.

Common workflows

Sanity-check before a wire transfer. Customer or coworker dictates an IBAN. Paste here. If invalid, ask for the correct number before initiating the transfer (and incurring the failed-wire fee).

Validate a payments form. Build server-side validation, but adding this tool to a docs page lets users debug their own input before submission.

Audit a stored set of IBANs. Run a list through to catch any that drifted (manual data entry, OCR errors).

Look up a bank. The bank code maps to a directory entry — your bank’s compliance team will use the country code + bank code to identify the institution.

Why local IBAN checking

IBANs are PII when paired with a name. Pasting them into a remote validation service exposes that pairing to whoever runs the site. Ours validates locally — paste freely, leave nothing behind.

Frequently asked questions

How does mod-97 validation work?
Move the first four characters to the end, replace each letter with its number (A=10, B=11, ..., Z=35), interpret the result as a giant integer, take mod 97. A valid IBAN gives 1.
Why does it catch typos?
The mod-97 check rejects ~99% of single-character mistypes and most digit transpositions. It is not designed against adversarial mistakes (no signature), but everyday human errors are caught.
What countries are supported?
All 70+ IBAN-using countries. Each has its own length and structure (UK 22 chars, Germany 22, Norway 15, Saint Lucia 32). We pick the parsing rule from the country code prefix.
Is the bank code globally unique?
Bank codes are unique within their country, not globally. Pair the bank code with the country to identify the bank. SWIFT/BIC codes serve the global function.
Are non-European countries IBAN-compliant?
Yes — the format is a global ISO standard (ISO 13616). Many Middle Eastern, Latin American, and Caribbean countries use it. Notably absent: USA, Canada, Australia.
Will it accept spaces in the input?
Yes — IBANs are often printed with spaces every 4 digits for readability. We strip whitespace before validation.
Does it validate IBANs for a specific country (Ireland, Pakistan, Malta, Brazil…)?
Yes. The tool reads the two-letter country prefix and applies that country's exact length and structure rule — Ireland (IE, 22 chars), Pakistan (PK, 24), Malta (MT, 31), Brazil (BR, 29), and every other IBAN registry member. A number that passes mod-97 but has the wrong length for its country is flagged as invalid.
How do I validate an IBAN in PHP, JavaScript, or via an API?
The algorithm is small enough to implement directly: PHP — rearrange, map letters to digits, and use bcmod($numeric, '97') === '1'. JavaScript — the same, computing the mod-97 in chunks to avoid BigInt overflow (or use ibantools / iban.js). For a hosted API, services like openiban exist, but note they receive the IBAN — this tool validates locally so nothing is transmitted.

Related tools

Last updated: 2026-07-04