1001Ferramentas
🏷️Validators

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 — 789 and 790 are GS1 Brasil, 000–019/030–039 the USA & Canada, 400–440 Germany.
  • 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 (prefix 977) 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: 02 and 20–29 are in-store/variable-weight codes; 978/979 are books, 977 serials — 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