Skip to content
OmniTools

Barcode Check Digit Calculator & Validator

Calculate or validate the GS1 Mod-10 check digit for EAN-13, UPC-A, GTIN-8 and ITF-14 codes, in bulk, with the algorithm explained step by step.

All business tools

Barcode check digit calculator

Result

StatusWaiting for a code
Type detected—
Expected check digit—
Full code—

A correct check digit only proves the digits were keyed in correctly. It does not mean the product exists. GS1 states that numbers not issued by a GS1 Member Organisation are invalid and will be rejected by retailers, so check codes against your own catalogue rather than a random-number generator.

This tool runs entirely in your browser. Nothing you enter is uploaded, stored, or logged.

What this tool does

Every GS1 barcode ends in a check digit that is not part of the product's identity. It is a single digit computed from the digits before it, purely to catch a keying error at the label printer, in a spreadsheet or at the till. It is the same GS1 Mod-10 algorithm on GTIN-8, UPC-A, EAN-13 and ITF-14, which means any code can be verified by hand in about ten seconds. This tool computes a missing check digit or validates a full code, and shows every weighted digit so the arithmetic can be followed rather than trusted.

How it works

The GS1 Mod-10 rule runs from the right. Take the body digits, exclude the check digit, and starting at the rightmost one alternate the weights 3, 1, 3, 1 and so on moving left. Add the results, and the check digit is whatever takes the total to the next multiple of ten, written as (10 - sum mod 10) mod 10. The alternating pattern is identical for every GTIN length, which is why one worked example teaches all four symbologies at once.

The four lengths differ only in how many body digits there are. GTIN-8 has 7 body digits, UPC-A and GTIN-12 has 11, EAN-13 and GTIN-13 has 12, and ITF-14 has 13. Padding the body to a common length before running the algorithm is a worthwhile habit when checking codes from several sources, because an ITF-14 that has lost a leading zero through a spreadsheet is otherwise very easy to weight incorrectly and still produce a plausible answer.

A passing check digit proves one narrow thing and nothing beyond it: that the digits you entered are consistent with the check digit attached to them. It does not prove the product exists, that the code was ever issued, or that the prefix belongs to the company you assume it does. GS1 is explicit that a number not issued by a member organisation is invalid, and most large retailers verify the prefix against the GS1 registry before accepting a listing.

That is precisely why a check digit calculator is the right tool and a random barcode generator is not. Plenty of sites will produce a valid-looking EAN for any product you name, and the result scans perfectly at the till and then fails at onboarding. Take the code from your own GS1 certificate or your distributor's paperwork, use this tool to confirm it was not transcribed wrongly, and never assign a number you were not issued.

Worked example

Computing the missing check digit for the EAN-13 body 400638133393.

  1. Read from the right, applying the weights 3, 1, 3, 1 across the 12 body digits
  2. Weighted digits: 4x1, 0x3, 0x1, 6x3, 3x1, 8x3, 1x1, 3x3, 3x1, 3x3, 9x1, 3x3
  3. Sum = 4 + 0 + 0 + 18 + 3 + 24 + 1 + 9 + 3 + 9 + 9 + 9 = 89
  4. Check digit = (10 - 89 mod 10) mod 10 = (10 - 9) = 1
  5. Cross-check with the same rule: UPC-A body 03600029145 gives 2, GTIN-8 body 9638507 gives 4

The check digit is 1, so the complete EAN-13 is 4006381333931. Change any one body digit and the check digit changes, which is exactly what makes a mistyped code detectable at the scanner.

Accuracy and limitations

  • The check digit proves your keying is internally consistent, not that the code was issued. GS1 states that numbers not issued by a member organisation are invalid, and retailers reject them at listing.
  • This validates structure only. It does not query the GS1 prefix registry, confirm a company name, or check the product, price or country of origin behind the number.
  • ITF-14 labels are frequently printed without human-readable digits, so a mis-keyed ITF-14 is hard to catch by eye. Validate at print time and again after any re-labelling, because the barcode has to be re-read rather than read.

Frequently asked questions

How do I calculate an EAN-13 check digit?
From the right of the 12 body digits, alternate the weights 3 and 1, add the products, and subtract the total from the next multiple of ten. For body 400638133393 the weighted sum is 89, so the check digit is 1 and the complete code is 4006381333931.
What is a valid barcode I can put on my own product?
Only a number issued to you by GS1, or one supplied by your distributor on their paperwork. This tool deliberately does not generate random codes, because a number nobody issued is invalid however well it scans and retailers reject it during onboarding.
Does a valid check digit mean the product exists?
No. It means only that the digits and the check digit agree with each other. Whether the product exists, which company holds the prefix, and whether that code belongs to that product all have to be verified separately against the GS1 registry.
Which barcode types use the same check digit?
All of the GS1 family. GTIN-8, UPC-A, GTIN-12, EAN-13, GTIN-13 and ITF-14 all use GS1 Mod-10 with the same alternating 3-and-1 weighting, so the only thing that changes between them is how many body digits there are.
Why does my barcode scan in one system and not another?
Most often the symbology does not match the number of digits, such as an EAN-13 number printed as a Code 128, or an ITF-14 with an inadequate quiet zone at the label edge. Also check that leading zeros were not dropped when the code was pasted through a spreadsheet.
Do check digits work on Code 128 and QR codes?
Not in the GS1 Mod-10 sense. Code 128 and Data Matrix can carry a GS1 Application Identifier and an AI (251) reference GTIN, but a plain Code 128 label is text with no check digit of its own and no structural validation available.