All Tools
Tools/IBAN Validator
🏦
ValidationAvailable

IBAN Validator

Validate IBAN numbers, extract BBAN and bank code, verify check digits using MOD-97, and confirm country-specific length rules.

Use test data only. All calculations run locally in your browser — PayProbe never sees, transmits, or stores your PAN, CVV, keys, PINs, or cryptographic inputs. How we handle data →

Example IBANs
CountryIBAN
United KingdomGB33BUKB20201555555555
GermanyDE75512108001245126199
FranceFR2531682128768051490609537
NetherlandsNL02ABNA0123456789
SwitzerlandCH5604835012345678009
PolandPL61109010140000071219812874
</> Code Implementation
# IBAN Validator — MOD-97 check digit verification
# No external dependencies required

def iban_validate(iban: str) -> dict:
    iban = iban.replace(" ", "").upper()
    if len(iban) < 5:
        return {"valid": False, "error": "Too short"}
    country = iban[:2]
    rearranged = iban[4:] + iban[:4]
    numeric = "".join(
        str(ord(c) - ord("A") + 10) if c.isalpha() else c
        for c in rearranged
    )
    remainder = int(numeric) % 97
    return {
        "valid": remainder == 1,
        "country": country,
        "check_digits": iban[2:4],
        "bban": iban[4:],
        "remainder": remainder,
    }

# Example
result = iban_validate("GB82 WEST 1234 5698 7654 32")
print(f"Valid   : {result['valid']}")
print(f"Country : {result['country']}")
print(f"BBAN    : {result['bban']}")
# Valid   : True
# Country : GB
# BBAN    : WEST12345698765432