Toolvito

Works on this device

Validation Rule Generator

Check an IBAN by its check digits and, for 78 countries, by its length and layout. You can also test the form of a BIC or a US routing number, and make validation rules for form fields. What you type is checked in this browser and is not sent anywhere.

Your number or rule

Tests the check digits of an IBAN and, for the countries in the list, its length and layout. Also shows the IBAN in groups of four.

Spaces, hyphens and small letters are fine. Use an example or a test number if you only want to see how the check works.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Type a number, or choose Try an example.

How to use this tool

  1. Choose what you want to do. The first option checks one IBAN.
  2. Type or paste the number. Spaces, hyphens and small letters are fine. The result updates as you type.
  3. Read the result and the line Rule applied. It says which rules were used for this number.
  4. Choose Copy text to copy the IBAN in groups of four, or Download CSV to keep the result or the table of a list.

What each option does

  • Check an IBAN tests the check digits. If the country is in the list of this tool, it also tests the length and the kind of each character. It shows the country, the check digits, the basic account number, and the IBAN with no spaces and in groups of four.
  • Check and format a list of IBANs does the same for up to 1,000 IBANs, one on each line, and writes the correct ones in one form.
  • Work out the check digits of an IBAN makes the two check digits from a country code and a basic account number.
  • Show the IBAN rule of a country gives the length and layout for one country as a regular expression, an HTML input box and a JSON Schema rule, and lists every country in this tool.
  • Check the form of a BIC (SWIFT code) tests the 8 or 11 characters of a BIC and shows its parts. It can compare its country with the country of an IBAN.
  • Check a US bank routing number (ABA) tests the check digit of a 9-digit routing number.
  • Make a validation rule for a form field writes a regular expression, an HTML input box and a JSON Schema rule for an email address, a phone number, a code of digits, a US ZIP code or a text of a set length.

How an IBAN is checked

An IBAN has two letters for the country, two check digits, and then the basic account number of that country. It has at most 34 characters. The check is the same for every country (ISO 13616, with the rule ISO 7064 MOD 97-10):

  1. Take out the spaces and write the letters as capital letters.
  2. Move the first four characters to the end.
  3. Write each letter as a number: A is 10, B is 11, and so on to Z, which is 35.
  4. Divide the long number by 97. The remainder must be 1.

The list of countries

The length of an IBAN and the layout of its account number are set by each country and kept in the IBAN registry. This tool has a list of 78 countries that was typed from the registry as it was known in 2025. The registry changes when a country joins or changes its rule, so a new country can be missing.

The result always says which rule was applied. For a country that is not in the list the tool does not guess: it tests the check digits only and says Country not in this tool's list: only the check digits were tested.

For Belgium, Spain, France and Monaco the tool also tests the check digits that those countries put inside the account number.

What a correct result does not tell you

  • A correct IBAN has the right form and check digits. It does not show that the account exists, that it is open, or who owns it. Only the bank can tell you that.
  • The check digits find a wrong character and two characters in the wrong order. They cannot find every mistake: about 1 wrong number in 97 passes by chance.
  • A correct form of a BIC does not show that the code is given to a bank. A correct check digit of a routing number does not show that the number is in use.

BIC and routing number

  • A BIC (ISO 9362) has 8 or 11 characters: 4 for the bank or business, 2 letters for the country, 2 for the place, and 3 more for a branch. XXX as the branch, or no branch, means the main office.
  • A US routing number has 9 digits. Multiply digits 1, 4 and 7 by 3, digits 2, 5 and 8 by 7, and digits 3, 6 and 9 by 1. The sum must end in 0.
  • An account number of a US bank has no public check rule, and a UK sort code and account number need bank tables that are not in this tool.

Rules for form fields

  • The email rule is the one that the HTML standard gives for an email box. You can also ask for a dot in the part after @.
  • The international phone rule is the form of ITU-T E.164: a plus sign and at most 15 digits. The other phone rule counts the digits and lets spaces, hyphens, full stops and round brackets pass.
  • Each rule is given as a regular expression, as an HTML input box with a pattern, as a JSON Schema rule and as a line of JavaScript. You can type a value to test it against the rule.
  • A rule tests the form of a value. It cannot show that an email address, a phone number or a postal code exists.

Your numbers stay in this browser

Every check on this page is arithmetic that runs in your browser. What you type is not sent to a server and is not stored. You do not need to use a real account number to try the tool: choose Try an example. The example numbers are example numbers that are printed in documents about IBANs, or invented numbers that pass the arithmetic. They are not real accounts.

Worked example

Check GB82 WEST 1234 5698 7654 32. With no spaces it is GB82WEST12345698765432. With the first four characters at the end it is WEST12345698765432GB82. With letters as numbers it is 3214282912345698765432161182. The remainder after division by 97 is 1, so the check digits are correct. The United Kingdom is in the list: 22 characters, with 4 letters, then 6 digits, then 8 digits.

Change the last two digits to 23. The remainder is now 49, and the result is Not a valid IBAN.

For the country code DE and the basic account number 370400440532013000, the number 370400440532013000DE00 gives the remainder 9, and 98 - 9 = 89. The IBAN is DE89 3704 0044 0532 0130 00.

The routing number 123456780 gives 3 x (1 + 4 + 7) + 7 x (2 + 5 + 8) + (3 + 6 + 0) = 36 + 105 + 9 = 150. It ends in 0, so the check digit is correct.

Limits you should know

  • This tool does not look up banks. It does not say which bank an IBAN, a BIC or a routing number belongs to.
  • The list of countries has 78 countries and was typed in 2025. Check the current IBAN registry of SWIFT when a result matters.
  • Checks inside the account number are done for Belgium, Spain, France and Monaco only. Other countries have such rules too, and they are not tested here.
  • The country code of a BIC is not tested against the list of all country codes.
  • This is not advice about payments. If a payment matters, confirm the details with the owner of the account or with the bank.
  • A regular expression for a form field is a first check. A server must still test what it gets.
  • Postal codes of countries other than the United States, card numbers, tax numbers and other identifiers are not part of this tool.

Related tools