How to use the EAN-8 generator
- Pick the Mode: Generate test values or Validate or complete.
- When generating, keep the Prefix on 0 or 2: restricted circulation (safe for tests), or choose Any prefix. Set How many (up to 500) and press Generate.
- When checking, type into EAN-8 (or the first 7 digits to get the check digit).
- Seven digits return the Check digit and Full EAN-8; eight digits return Result with the digit given and expected.
What it does and when to use it
EAN-8 is the short form of the European Article Number. It carries 7 data digits and 1 check digit, which is enough for a small product range but nowhere near enough for every company, so GS1 hands EAN-8 numbers out sparingly.
The most common jobs for this page are testing a till or inventory app that has to accept both 8- and 13-digit codes, making labels for shelf or loose items in your own shop, and checking a number that has been read off a tiny pack. If your item has room for a normal barcode, use the EAN-13 generator; for North American shelves, the UPC-A generator. To draw the barcode itself, paste the number into the barcode generator and choose EAN-8.
How it works
EAN-8 uses the same GS1 mod-10 rule as the longer codes, but with seven data digits the weights start with 3:
- Multiply the 1st, 3rd, 5th and 7th digits by 3, and the 2nd, 4th and 6th by 1.
- Add everything up.
- The check digit brings the total up to the next multiple of 10.
Test numbers start with 0 or 2, followed by six random digits from crypto.getRandomValues, and then the check digit.
Worked examples
- Completing a code. For
9638507: 9×3 + 6 + 3×3 + 8 + 5×3 + 0 + 7×3 = 86. Four more makes 90, so the tool returnsCheck digit: 4. - Checking it. The full code
96385074givesResult: Valid. - Another one.
5512345givesFull EAN-8: 55123457. - Test numbers. One run gave
04674238and03555729, both in the restricted range, with the standard test-values note.
Limits and tips
- Leading zeros matter. Store EAN-8 numbers as text, not numbers, or a spreadsheet will drop the 0 and break the code.
- The tool does not convert EAN-8 to EAN-13; they are separate number systems, not padded versions of each other.
- A correct check digit only proves the digits are consistent, not that a product exists.
Frequently asked questions
When is EAN-8 used instead of EAN-13?
Why do generated numbers start with 0 or 2?
Can I register my own EAN-8?
What happens if I type 13 digits?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.