You typed your IBAN, hit send, and the bank threw it straight back: invalid IBAN. The number looks exactly right — same letters, same digits you copied off the invoice — but the transfer won't go through. Before you blame the bank, know this: every IBAN carries a built-in self-check, and it just did its job. Those two digits right after the country code are a checksum whose whole purpose is to catch a single typo or two swapped characters before your money moves to the wrong account. If you just need the payment to work, the fix is usually one mistyped character. If you're a developer wiring up validation, here's exactly how the MOD-97 algorithm does it.

What are the IBAN check digits?

An IBAN is a country code, two check digits, then the BBAN — your domestic bank and account number. Those two check digits (positions 3 and 4) aren't part of your account. They're computed from the rest of the number using an algorithm called MOD-97, formally ISO 7064, mod 97-10. To validate an IBAN, you run the same math and confirm the result comes out to exactly 1. If it doesn't, something in the number is wrong.

One caveat worth stating up front: passing MOD-97 only proves the number is internally consistent and the correct length. It does not confirm that the bank, branch, or account actually exists or is open. That requires a separate bank-directory or account-verification lookup — not the check-digit arithmetic.