Verhoeff Checksum Checker

Validate digits using the dihedral group Verhoeff algorithm

Validates numbers with the Verhoeff checksum and computes the correct check digit using the D5 dihedral group tables. Detects all single-digit and adjacent-transposition errors; used by India's Aadhaar. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is the Verhoeff checksum?

The Verhoeff algorithm is a check-digit scheme published in 1969 that uses the dihedral group D5 rather than simple arithmetic. This lets it detect all single-digit errors and all adjacent transposition errors.

The Verhoeff algorithm is a check-digit method designed by Jacobus Verhoeff in 1969. Unlike simpler schemes, it is built on the dihedral group D5, which lets it catch every single-digit error and every adjacent transposition — including the 0-and-9 swap that the Luhn algorithm misses. This checker validates numbers and computes the correct check digit in your browser.

How it works

Verhoeff relies on three lookup tables: a multiplication table d, a permutation table p, and an inverse table inv.

  1. To validate, start with c = 0. For each digit, processed from the right at position i, set c = d[c][p[i mod 8][digit]]. The number is valid if c ends at 0.
  2. To generate a check digit for a payload, run the same loop with the position index offset by one, then the check digit is inv[c].

The permutation table is what makes the algorithm position-sensitive, and the non-commutative group multiplication is what catches transpositions.

Example

The payload 236 has Verhoeff check digit 3, so 2363 is valid. Changing the last digit to 2364 makes the checksum fail, which the tool reports along with the correct expected digit.

Notes

The tool implements the standard published d, p and inv tables, so its results match reference implementations and real-world Aadhaar check digits. A valid checksum confirms internal consistency only, not registration. All computation runs locally and nothing leaves your browser.

Verhoeff vs Luhn — when it matters

The Luhn algorithm (used by credit cards and many ID numbers) misses exactly one transposition: swapping a 0 and a 9 that are adjacent passes Luhn’s check because of how its doubling step works. In practice this failure is rare, but in high-stakes identity systems — particularly where numeric entry by hand is common and data quality is critical — Verhoeff’s guarantee of catching every adjacent transposition is a meaningful advantage.

The tradeoff is implementation complexity. Luhn requires only a doubling table and basic arithmetic; Verhoeff requires three lookup tables and more careful index management. For this reason, Luhn is far more prevalent in financial systems (it is the standard for credit card validation globally), while Verhoeff has been adopted where the stronger guarantee justifies the overhead, with the Aadhaar 12-digit national identity number being the highest-profile example.

Verifying Aadhaar check digits

India’s Aadhaar identity card carries a 12-digit number whose last digit is a Verhoeff check digit over the first 11. To verify: paste the full 12-digit Aadhaar number into the tool. A valid result confirms the digits are internally consistent with the Verhoeff algorithm, which is one of the checks that Aadhaar enrollment software applies. It does not confirm the number exists in the UIDAI database — that requires an official API call.

Generating a check digit for a new number

If you are building a system that issues identifier numbers and want to append a Verhoeff check digit, enter only the payload digits (the number without its check digit). The tool computes the correct digit to append and shows the full valid number. The resulting number will pass the validation step on any correct Verhoeff implementation.