Free tool

Check an IBAN

Paste an IBAN: the tool checks the length expected for the country, the check digits (ISO 13616, modulo 97) and, for a French IBAN, the RIB key and the bank, branch and account codes.

The check runs in your browser: the IBAN is neither sent nor stored.

How IBAN check digits work

  1. Move the first four characters (country and check digits) to the end.
  2. Replace each letter with a number: A = 10, B = 11… Z = 35.
  3. The resulting large number, divided by 97, must leave a remainder of 1.
static boolean isValidIban(String iban) {
    String s = iban.replaceAll("\\s", "").toUpperCase();
    String moved = s.substring(4) + s.substring(0, 4);
    StringBuilder digits = new StringBuilder();
    for (char c : moved.toCharArray()) {
        digits.append(Character.isLetter(c) ? String.valueOf(c - 'A' + 10) : String.valueOf(c));
    }
    return new BigInteger(digits.toString()).mod(BigInteger.valueOf(97)).intValue() == 1;
}

In production, also check the country length, or use a library such as iban4j. For transfer amounts, see our tutorials on handling money in Java and the Spring Boot payments API.

The same calculation in Java, tested and free to use (Apache 2.0), on GitHub

The most used free tools

All free tools

Your systems compute this every day?

Payments, lending, markets: our consultants know the business rules as well as the code. Our legacy diagnostic finds fragile calculations and tells you what to fix first.

The diagnostic Contact us

Worth a look