Barcode Check Digit Calculator (UPC, EAN)
Calculate or verify the GS1 modulo-10 check digit for EAN-13, UPC-A and EAN-8 barcodes.
Enter the data digits to compute the check digit, or the full code to verify it. Spaces and hyphens are ignored.
How to use
- Pick the barcode format: EAN-13, UPC-A or EAN-8.
- Enter the data digits without the check digit to calculate it, or the full code to verify it.
- Read the check digit and copy the complete code (its check digit is highlighted).
- Try EAN-13 data 400638133393 — the check digit is 1, giving 4006381333931.
About this tool
ShowHide
Retail barcodes — EAN-13, UPC-A and EAN-8 — end with a single check digit computed from all the digits before it using the GS1 modulo-10 algorithm. Starting from the rightmost data digit, digits are weighted alternately by 3 and 1, the weighted values are summed, and the check digit is whatever brings that sum up to the next multiple of ten. This tool works both ways: type the data digits (12 for EAN-13, 11 for UPC-A, 7 for EAN-8) and it returns the check digit and the complete code, or paste a full barcode and it confirms whether the printed check digit is correct. Non-digit characters such as spaces and hyphens are ignored. Everything runs locally in your browser — nothing is uploaded.
Frequently asked questions
How is the check digit calculated?
Using the GS1 modulo-10 method: from the rightmost data digit, multiply digits alternately by 3 and 1, add the products, then the check digit is (10 − sum mod 10) mod 10. EAN-13, UPC-A and EAN-8 all share this algorithm.
What is the difference between the formats?
EAN-13 is a 13-digit code (12 data + 1 check) used worldwide; UPC-A is the 12-digit North American code (11 data + 1 check); EAN-8 is a compact 8-digit code (7 data + 1 check) for small packages.
Does this validate ISBN barcodes?
Yes for the barcode itself — a 13-digit ISBN printed as a barcode is an EAN-13 and uses this exact check digit. Note the older 10-digit ISBN uses a different modulo-11 scheme, so use an ISBN-specific tool for those.
The check digit is valid but the code scans as the wrong product. How?
Because the check digit only proves the number was read correctly, not that it identifies what you think. A GS1 number is assigned to a company prefix and then to an item by that company, so a valid code can belong to a product you have never heard of, to a reused number from a discontinued line, or to a range someone bought for internal use. Validity is a property of the digits; identity comes from the catalogue.
Why does the same product show different numbers in different countries?
Because the same item is often registered separately by each distributor, and because the packaging differs: a different size, a multipack or a regional variant is a different item and gets its own number. The leading digits indicate which national organisation issued the company prefix rather than where the product was made, which is a common misreading of them.
Guides on this topic
Related tools
Barcode Generator
Make an EAN-13, EAN-8, UPC-A, Code 128, Code 39 or ITF-14 barcode and download it as SVG or PNG. Runs in your browser.
Image
ISBN Validator (ISBN-10 / ISBN-13)
Validate ISBN-10 and ISBN-13 checksums and convert between the two formats. Hyphens and spaces are handled.
Developer
Check Digit Calculator: Luhn, Verhoeff, Damm
Compute and verify check digits with Luhn, Verhoeff, Damm and the ISO 7064 family (MOD 11-2, 97-10, 37-2…), and see which typing errors each one catches.
Developer
CSR Decoder (PKCS#10)
Read a certificate signing request before you send it: subject, SANs, key size, signature algorithm, and whether its self-signature verifies.
Developer
Credit Card Validator (Luhn + Brand)
Validate a card number with the Luhn checksum, detect brand (Visa/MC/Amex/etc), and check expected length. Local, no network.
Developer
Python Pickle Inspector
Disassemble a .pkl file in the browser: every opcode, the memo, the value it rebuilds, and whether loading it would run code.
Developer