1001Ferramentas
๐Ÿท๏ธ Validators

EAN-8 Validator

Validates EAN-8 barcodes computing the check digit per GS1 spec.

โ€”

EAN-8 check digit, computed by hand

EAN-8 / GTIN-8 is the compact 8-digit GS1 barcode used where a full EAN-13 won't physically fit โ€” small cosmetics, confectionery, single-serve items. The eighth digit is a mod-10 check digit that lets a scanner reject a misread instantly. This tool verifies it; here is exactly how that digit is derived, using the example 73513537.

Step by step for 7351353 ?

  • 1. Weights: over the first seven digits apply 3,1,3,1,3,1,3 (odd positions from the left weigh 3).
  • 2. Multiply & sum: 7ร—3 + 3ร—1 + 5ร—3 + 1ร—1 + 3ร—3 + 5ร—1 + 3ร—3 = 21+3+15+1+9+5+9 = 63.
  • 3. Next multiple of 10: 63 โ†’ 70.
  • 4. Check digit: 70 โˆ’ 63 = 7 โ†’ the full code is 73513537. โœ“

Equivalently, the check digit is (10 โˆ’ (sum mod 10)) mod 10 โ€” the same formula GS1 uses for EAN-13, UPC-A and ITF-14, only the weight pattern length changes.

Why a check digit at all

  • Single-digit errors: any one wrong digit changes the weighted sum, so the checksum fails โ€” caught at the scanner.
  • Most transpositions: swapping two adjacent digits usually breaks the 3/1 weighting too (though a few transposition pairs slip through, a known mod-10 limitation).
  • Self-checking print: the human-readable digits under the bars can be re-verified without a database.

Common pitfalls

  • Weight order direction: GS1 weights run right-to-left in the spec, but for an 8-digit code that lands on 3,1,3,1,3,1,3 from the left โ€” get the alignment wrong and every result is off.
  • Not UPC-E: UPC-E is a compressed 6-digit UPC-A, a different thing from EAN-8's independently allocated number.
  • Leading zeros: keep the value as an 8-character string; integer storage drops zeros and corrupts the checksum.
  • Valid digit โ‰  real product: a correct checksum doesn't mean GS1 has licensed that GTIN.

FAQ

Is the EAN-8 algorithm the same as EAN-13? Yes โ€” identical mod-10 with alternating 3/1 weights; only the number of digits being weighted differs.

What if the sum is already a multiple of 10? Then the check digit is 0 (e.g. sum 60 โ†’ 60 โˆ’ 60 = 0).

Can the check digit ever be X? No โ€” EAN/UPC check digits are always 0โ€“9. Only ISBN-10 and ISSN (mod-11) can be X.

Related Tools