EAN-13 Checksum Validator
Validate an EAN-13 barcode (13 digits) by its official check digit. Essential for retail, inventory control and product registration.
EAN-13 (GTIN-13): the worldwide retail barcode
EAN-13 — formally GTIN-13 — is the 13-digit barcode on virtually every retail product worldwide, managed by GS1. Introduced in 1977 as the international superset of the 12-digit US UPC-A (a UPC-A is just an EAN-13 with a leading 0), it encodes who made the product and which item it is. The validator on this page checks the 13-digit structure and the check digit; the example 7896005800423 is a Brazilian code (prefix 789).
The checksum is the GS1 mod-10: weight the first 12 digits alternately by 1 and 3 (the leftmost gets weight 1, so positions are 1,3,1,3…), sum, and the check digit is (10 − (sum mod 10)) mod 10.
The three parts of 789-6005800-42-3
- GS1 prefix (
789): the country/region bank that licensed the company prefix —789and790are GS1 Brasil,000–019/030–039the USA & Canada,400–440Germany. - Company + item: the company prefix (assigned by the national GS1) plus the product reference the company itself allocates.
- Check digit (
3): the mod-10 digit above.
Where it shows up
- POS & inventory: the universal scan code at every checkout and warehouse.
- Marketplaces: Amazon, Mercado Livre and others require a valid GTIN to list a product.
- Books & serials: ISBN-13 (prefix
978/979) and ISSN barcodes (prefix977) are EAN-13s too. - Mock data / testing: generating checksum-valid GTINs for catalog and ERP fixtures.
Gotchas
- The GS1 prefix is not the country of origin: it only shows where the company registered, not where the product was made.
- Restricted prefixes:
02and20–29are in-store/variable-weight codes;978/979are books,977serials — not generic products. - UPC-A is a subset: a 12-digit UPC is an EAN-13 with a leading zero; don't treat them as different checksums.
- Leading zeros & GTIN-14: store as a string; databases often pad to 14 digits for case/pallet levels.
FAQ
How is the EAN-13 check digit computed? Weights 1,3,1,3… over the first 12 digits; check = (10 − sum mod 10) mod 10. Same algorithm as ISBN-13.
Does prefix 789 mean "made in Brazil"? No — it means the company registered with GS1 Brasil. The goods themselves could be manufactured anywhere.
Is a valid EAN-13 a guarantee the product exists? No. The checksum only proves the number is well-formed; only GS1's registry confirms a real, licensed GTIN.
Related Tools
EAN-8 Checksum Validator
Validate an EAN-8 barcode (8 digits) by checking the check digit with the official algorithm. Useful for small products, retail and inventory control.
EAN-13 Validator
Validate EAN-13 (13-digit) retail barcode.
ISBN-13 with Checksum Validator
Validate ISBN-13 (13 digits) — modern format since 2007. Includes 978/979 prefix and EAN-13 check digit.
Luhn Validator (generic)
Validate any numeric sequence using Luhn (mod 10) — used in credit cards, IMEI, ICCID and other IDs. Shows check digit.
EAN-8 Validator
Validate an EAN-8 barcode (8 digits) by computing the check digit per the GS1 spec. Useful for small products, retail and inventory control.
UPC-A Validator
Validate UPC-A (12-digit) barcode used in US/Canada retail.