Skip to content
S
Softween Tools
Back to Blog
dev-helpers

IBAN Validation: How International Bank Account Numbers Work

Learn the structure of IBAN numbers, how validation works with the MOD-97 algorithm, and validate IBANs with our free tool.

·Softween

IBAN (International Bank Account Number) is a standardized system for identifying bank accounts across national borders. Proper IBAN validation prevents costly payment errors and rejected transactions.

IBAN Structure

An IBAN consists of up to 34 alphanumeric characters:

PartLengthDescription
Country code2 lettersISO 3166-1 alpha-2 (e.g., TR, DE, GB)
Check digits2 digitsCalculated using MOD-97
BBANUp to 30Basic Bank Account Number (country-specific)

IBAN Length by Country

CountryLengthExample Format
Turkey (TR)26TR00 0000 0000 0000 0000 0000 00
Germany (DE)22DE00 0000 0000 0000 0000 00
United Kingdom (GB)22GB00 AAAA 0000 0000 0000 00
France (FR)27FR00 0000 0000 0000 0000 0000 000
Netherlands (NL)18NL00 AAAA 0000 0000 00

MOD-97 Validation Algorithm

  • Move the first 4 characters to the end
  • Convert letters to numbers (A=10, B=11, ... Z=35)
  • Compute the remainder when divided by 97
  • If the remainder is 1, the IBAN is valid
  • Common IBAN Errors

  • Typos: A single wrong digit invalidates the entire IBAN
  • Wrong length: Each country has a fixed IBAN length
  • Missing country code: Always include the 2-letter prefix
  • Spaces vs. no spaces: Both formats are valid; remove spaces for processing
  • Developer Best Practices

  • Strip all whitespace before validation
  • Validate both format and check digits
  • Display IBANs in groups of 4 characters for readability
  • Store IBANs without spaces in databases
  • Try It Yourself

    Validate any IBAN number instantly with our free IBAN Validator. Check the format, country, and MOD-97 check digits in real time.

    Related Tools

    Command Palette

    Search for a command to run...