Search for a tool
Verhoeff Algorithm (Checksum)

Tool for calculating and verifying numbers using the Verhoeff algorithm (checksum). Generate check digits, detect input errors, and secure barcodes or identifiers.

Results

Verhoeff Algorithm (Checksum) -

Tag(s) : Checksum, Arithmetics

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Verhoeff Algorithm (Checksum)' tool for free! Thank you!

Verhoeff Algorithm (Checksum)

Verhoeff Checksum Calculator





Missing digit calculator


Verhoeff Number Generator


Answers to Questions (FAQ)

What is Verhoeff's algorithm? (Definition)

Verhoeff's algorithm is a check digit calculation algorithm designed to detect input errors in decimal numeric identifiers (serial numbers, administrative IDs, etc.).

Verhoeff's algorithm can detect all single-digit substitution errors and all adjacent digit transpositions, as well as some multiple errors.

How does Verhoeff's algorithm work?

The algorithm uses three tables (index 0): the multiplication table (D) based on the dihedral group D5, the permutation table (P) which permutes the digits according to their position, the inverse table (I) which allows the calculation of the final check digit.

D =P =I =
0123456789
1234067895
2340178956
3401289567
4012395678
5987604321
6598710432
7659821043
8765932104
9876543210
0123456789
1576283094
5803796142
8916043527
9453126870
4286573901
2793806415
7046913258
0
4
3
2
1
5
6
7
8
9

Example: The initial number 123 has the digit 3 in position 1, the digit 2 in position 2, and the digit 1 in position 3 (read from right to left). Position 0 is for the checksum.

An iterative calculation (to calculate the checksum c) is applied, with an initialization of c = 0.

Example:

IterationPositionDigitPermutationMultiplicationc
#113P[1][3]=6D[c=0][6]=66
#222P[2][2]=0D[c=6][0]=66
#331P[3][1]=9D[c=6][9]=22

The final checksum is calculated by looking in the inverse table based on the value of c.

Example: The checksum is I[2] = 3, so the number with the checksum is 1233.

What errors does Verhoeff's algorithm detect?

Verhoeff's algorithm effectively detects several types of input errors:

— All simple substitution errors, where one digit is replaced by another (e.g., 1234 → 1239).

— All adjacent transpositions, where two neighboring digits are reversed (e.g., 1234 → 1324).

— Some multiple errors, where two or more digits are entered incorrectly simultaneously.

However, the algorithm does not detect certain complex permutations, such as circular permutations (e.g., 1234 → 4123) or some non-adjacent transpositions.

When was Verhoeff's algorithm invented?

Developed in 1969 by the Dutch mathematician Jakob Verhoeff, it improves upon simpler methods like the checksum modulo 10 (Luhn's algorithm) by offering better detection of common human errors.

Source code

dCode retains ownership of the "Verhoeff Algorithm (Checksum)" source code. Any algorithm for the "Verhoeff Algorithm (Checksum)" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Verhoeff Algorithm (Checksum)" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Verhoeff Algorithm (Checksum)" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Verhoeff Algorithm (Checksum)" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).

Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).

To cite dCode.fr on another website, use the link: https://www.dcode.fr/verhoeff-algorithm

In a scientific article or book, the recommended bibliographic citation is: Verhoeff Algorithm (Checksum) on dCode.fr [online website], retrieved on 2026-01-08, https://www.dcode.fr/verhoeff-algorithm

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Verhoeff Algorithm (Checksum)' tool for free! Thank you!


https://www.dcode.fr/verhoeff-algorithm
© 2026 dCode — The ultimate collection of tools for games, math, and puzzles.
â–˛  
Feedback