Dev.to
7/5/2026

How to Validate an IBAN (MOD-97 Check Digit, Explained)
Short summary
Every IBAN has a built-in MOD-97 checksum in positions 3 and 4 that catches typos and swapped characters before payment is sent. To validate: normalize the string (uppercase, remove spaces), move the first four characters to the end, convert letters to their numeric equivalents (A=10…Z=35), then verify that the resulting number mod 97 equals exactly 1. Passing MOD-97 validates internal consistency but doesn't confirm the bank account actually exists or is open.
- •MOD-97 checksum in every IBAN detects single character errors before payment
- •Algorithm: normalize → rotate → convert letters to digits → verify mod 97 equals 1
- •Validation proves consistency, not that account exists or is open
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



