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
- Strip whitespace.
- Validate length matches the country’s IBAN format (each country has a fixed length).
- Compute mod-97 over the rearranged numeric form.
- 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:
| Country | Code | Length |
|---|---|---|
| Germany | DE | 22 |
| United Kingdom | GB | 22 |
| France | FR | 27 |
| Ireland | IE | 22 |
| Malta | MT | 31 |
| Pakistan | PK | 24 |
| Brazil | BR | 29 |
| Norway | NO | 15 |
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?
Why does it catch typos?
What countries are supported?
Is the bank code globally unique?
Are non-European countries IBAN-compliant?
Will it accept spaces in the input?
Does it validate IBANs for a specific country (Ireland, Pakistan, Malta, Brazil…)?
How do I validate an IBAN in PHP, JavaScript, or via an API?
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