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
CPF Validator
Validate Brazilian CPF numbers instantly using the official algorithm. Useful for testing document validation in applications. No data sent to servers.
Batch CPF Validator
Validate a list of CPFs (one per line) and see which are valid and which are not. No data sent to servers.
Batch CNPJ Validator
Validate a list of CNPJs (one per line) with a summary of valid, invalid and total. No data sent to servers.