Check Digit Validator & Generator

Validate or calculate check digits with Luhn (mod 10), Verhoeff, Damm, ISBN-10, ISBN-13, EAN-13 (JAN), UPC-A, Modulus 10 and Modulus 11 (weights 2-7). When a number is wrong, the tool shows the expected check digit and the corrected number. Hyphens and spaces are ignored.

About this tool

What is a check digit?

A check digit is an extra digit, usually at the end of an identification number, calculated from the other digits. If someone mistypes a digit or swaps two neighboring digits, the check digit no longer matches and the error is caught. Credit card numbers, ISBNs and product barcodes all use one. This tool validates a complete number or generates the check digit for a number without one, using nine algorithms.

How to use

  1. Choose Validate or Generate with the switch at the top.
  2. Pick an Algorithm from the list.
  3. In Validate mode, enter the full number in Number with check digit. A green message confirms a valid number; otherwise the expected check digit and the corrected number are shown.
  4. In Generate mode, enter Number without check digit. The complete number appears under Generated Number:; click the copy icon to copy it.

Hyphens and spaces are ignored, and other characters are removed as you type. For ISBN-10 validation, a final X (meaning 10) is accepted.

Supported algorithms

AlgorithmDigitsTypical useExample
Luhn (Modulus 10)anyCredit cards, IMEI4532015112830366
VerhoeffanyAadhaar and other ID numbers1428570
DammanyCustom IDs5724
ISBN-1010Books (before 2007)0-306-40615-2
ISBN-1313Books (since 2007)978-0-306-40615-7
EAN-1313Retail barcodes (JAN in Japan)4901777018686
UPC-A12Retail barcodes (North America)012345678905
Modulus 10 (Weight 1-2-1)anyCustom numbering12344
Modulus 11 (Weight 2-7)anyJapanese My Number (個人番号)123456789018

For algorithms with a fixed length, the tool reports a wrong number of digits separately from a wrong check digit.

How the main algorithms work

  • Luhn: from the right, double every second digit (subtract 9 if the result is over 9), add everything, and choose the check digit that makes the total a multiple of 10. Example: 7992739871 → check digit 3.
  • ISBN-13 / EAN-13 / UPC-A: weight the digits alternately 1 and 3 (UPC-A starts with 3), sum them, and take (10 − sum mod 10) mod 10.
  • ISBN-10: weights 10 down to 2; the check digit is (11 − sum mod 11) mod 11, written X when it is 10.
  • Modulus 11 (2-7): weights 2, 3, 4, 5, 6, 7, 2, 3 ... from the right; the check digit is 11 − (sum mod 11), or 0 when the remainder is 0 or 1.
  • Modulus 10 (1-2-1): weights 1, 2, 1, 2 ... from the left, with digit sums for two-digit products.
  • Verhoeff and Damm use lookup tables (the dihedral group D5 and a quasigroup) and catch every single-digit error and every adjacent transposition.

Features

  • Validate and generate modes for nine algorithms
  • Expected check digit and corrected number shown for invalid input
  • Digit-count checks for ISBN, EAN-13 and UPC-A
  • Copy button for generated numbers and a quick reference table of examples
  • Runs entirely in the browser; mode, algorithm and input are remembered locally

FAQ

Does a valid Luhn result mean a credit card is real?

No. It only means the number is well-formed. A check digit catches typing mistakes; it does not prove that a card, book or product exists, and it is not a security feature.

Which errors does each algorithm catch?

Luhn, EAN/UPC and similar mod 10 schemes catch all single-digit errors and most swaps of neighboring digits (Luhn misses 09 ↔ 90). ISBN-10, Verhoeff and Damm catch every single-digit error and every adjacent swap.

Is the number I enter sent anywhere?

No. Calculations happen locally and nothing is uploaded.