Barcode Check Digit Validator & Calculator (UPC/EAN/GTIN)
Free tool to validate and calculate the check digit of UPC-A, EAN-8, EAN-13, and GTIN-14 barcodes. Enter the full number to validate it, or the digits without the check digit to calculate and append the correct one. Runs entirely in your browser.
What Is a Barcode Check Digit Validator?
This free online tool validates or calculates the check digit — a single verification digit — shared by four barcode standards: UPC-A, EAN-8, EAN-13, and GTIN-14. It uses the weighted mod-10 calculation defined by GS1 to confirm whether a number is valid, instantly and in your browser.
In "Validate" mode, enter the full number including the check digit to see whether it matches. In "Calculate" mode, enter just the digits without a check digit and the correct one is appended automatically. It's useful for checking a newly assigned product code or diagnosing why a barcode won't scan.
How to Use
- Choose a mode Switch between "Validate" and "Calculate" depending on whether your number already includes a check digit.
- Enter the barcode number You can paste a number with spaces or dashes as-is.
- Check the result Validate mode shows a match/mismatch and the detected format; Calculate mode shows the completed full number.
- Try another number Use the Clear button to reset the input and check another number.
Tips for getting more out of it
- You can paste a number with spaces or dashes — they're stripped automatically before calculating.
- Use "Calculate" mode when drafting a new product code before it's printed: enter the digits without a check digit, and the correct one will be appended automatically.
- UPC-A (12 digits) uses the same algorithm as EAN-13 (13 digits) with a leading zero, so both formats are validated with the same weighted calculation.
- GTIN-14 adds a leading "indicator digit" (representing the packaging level) to an EAN-13, and is commonly used to identify cases and pallets in logistics.
- If a barcode scanner fails to read a printed label, checking the check digit here first helps you tell whether it's a printing defect or a data entry mistake.
Use Cases
Checking a newly assigned product code
When building a new product code from a GS1 company prefix, confirm the check digit was calculated correctly.
Diagnosing why a barcode won't scan
If a printed barcode fails to scan, check the check digit first to tell apart a printing defect from a data error.
Reference for validation logic in software development
Use it as a reference when implementing barcode validation logic (GS1's mod-10 check digit) in inventory or POS systems.
Checking barcodes on imported products
Confirm that an EAN-13 or GTIN-14 number printed on an imported product follows the correct format.
Glossary
- UPC-A
- Universal Product Code — a 12-digit barcode standard used mainly in the US and Canada.
- EAN-13
- European Article Number — the international 13-digit barcode standard, which also covers Japan's JAN codes.
- EAN-8
- A shortened 8-digit barcode standard used on small products.
- GTIN-14
- Global Trade Item Number — a 14-digit code formed by adding an indicator digit to an EAN-13, used to identify cases and pallets.
- Check digit
- A single verification digit at the end of a barcode, calculated with GS1's weighted mod-10 formula to catch input errors.
- GS1
- The nonprofit organization that maintains international barcode and product identification standards, formerly known as UCC/EAN.
Frequently Asked Questions
Side Note — How One Digit Catches a Typo
Many people have watched a cashier manually key in a product code after the scanner failed to read it. You might expect a single mistyped digit to register a completely different product, but in practice most such errors are caught automatically. What makes this possible is a single digit at the end of every barcode called the check digit.
This mechanism dates back to the early 1970s, when the US grocery and consumer goods industry developed the Universal Product Code (UPC). At the time, cashiers still entered prices by hand, and typing mistakes were a serious source of billing errors and inventory confusion. The weighted mod-10 calculation adopted by GS1 (then the UCC) could be implemented with nothing more than repeated addition, so it ran comfortably on the computing power available at the time, while still catching most of the errors people actually make — like transposing two adjacent digits or mistyping a single one.
What's notable is that the very same calculation is shared across four barcode standards with completely different digit counts: UPC-A (12 digits), EAN-8 (8 digits), EAN-13 (13 digits), and GTIN-14 (14 digits). Because the rule — weight the digits 3 and 1 alternately starting from the rightmost one, then adjust the sum to the next multiple of 10 — works regardless of length, GS1 never had to design a new validation algorithm each time it introduced a new standard. It's a quietly elegant piece of design, considering that checkout systems around the world all rely on this one simple formula.