EAN-8 Checksum Validator
Validate an EAN-8 barcode with checksum.
EAN-8: the short retail barcode for small packages
EAN-8 (also called GTIN-8) is the 8-digit member of the GS1 barcode family, created for products too small to carry the full 13-digit EAN-13 โ think gum, lip balm, single confectionery or cosmetics. It is administered by GS1, and unlike a truncated EAN-13 it is a distinct, separately allocated number. The validator on this page checks the 8-digit structure and the check digit.
The checksum is the standard GS1 mod-10: take the first seven digits, weight them alternately by 3 and 1 (the leftmost digit gets weight 3), sum, and the check digit is (10 โ (sum mod 10)) mod 10.
Structure of an EAN-8
- GS1 prefix (2โ3 digits): the number-system / country bank that allocated the code (e.g.
40โ44Germany,789โ790Brazil). - Item reference: the remaining digits, assigned by GS1 to the specific product โ there is no separate company field in EAN-8.
- Check digit (last): the mod-10 digit above.
EAN-8 vs EAN-13
- Not a shortened EAN-13: EAN-8 numbers are drawn from a separate pool; you can't derive one from the other.
- Allocation is scarce: GS1 grants EAN-8 only when EAN-13 genuinely won't fit, because the 8-digit space is small.
- Same scanner: POS readers decode both; internally both are zero-padded to a 14-digit GTIN-14.
Gotchas
- GTIN-14 padding: when stored in databases, an EAN-8 is often left-padded with zeros to 14 digits โ strip them before display.
- Restricted-circulation codes: prefixes
02and20โ29are for in-store use (variable-weight items) and aren't globally unique. - Valid checksum โ registered product: the algorithm only proves the number is well-formed.
- Leading zeros matter: store as a string; an integer drops them and breaks the checksum.
FAQ
How is the EAN-8 check digit computed? Weights 3,1,3,1,3,1,3 over the first seven digits; check = (10 โ sum mod 10) mod 10 โ the same mod-10 used by EAN-13 and UPC.
Can I convert EAN-8 to EAN-13? No. They are independent allocations. For internal systems you pad to GTIN-14, but that's zero-padding, not conversion.
Why use EAN-8 at all? Physical space: the 13-digit symbol is too wide for very small packaging, so GS1 issues a compact 8-digit code instead.
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.