EAN-8 Barcode Generator

EAN-8 is the compact retail barcode for a GTIN-8: four digits on each side of the center guard, with the final digit protecting the first seven. Enter 7 digits and this tool computes the check digit; enter all 8 and it verifies the digit you supplied. A structurally valid number is not automatically allocated or licensed — the GS1 note below explains that boundary.

EAN-8

EAN-8 settings

7 digits (check digit computed for you) or 8 digits (check digit verified).

The check-digit readout appears here once a barcode is generated.

Enter content above to generate a barcode.

Output options

Both presets retain the required quiet zones and must pass the independent decoder before downloads are enabled.

Hiding the text changes only the caption. The bars still encode the same validated value.

For scanning and print, prefer PNG, SVG, PDF, or EPS — JPEG compression can soften bar edges. ZPL downloads as a text file of native printer commands, not an image. Need a different image format? Convert the PNG at fileconverters.ai.

Before print or production use: test the downloaded barcode with your own scanner or scanner app. This tool verifies the mathematics (check digits, character sets) and the rendered bars — it cannot verify your printer's contrast, size, or quiet-zone reproduction.

When EAN-8 is the right retail barcode

EAN-8 solves a physical-space problem. It identifies a very small consumer product when a correctly sized EAN-13 cannot fit on the package or label. GS1 Ireland describes the symbol as the carrier for eight-digit GTINs allocated to very small retail products, and its GTIN-8 guidance explains that allocation is product-specific. EAN-8 does not encode letters, prices, URLs, or an arbitrary shortened product number. For internal identifiers, use Code 128 instead.

How eight digits fit into 67 barcode modules

The bars occupy 67 modules: a three-module start guard, four left-side digits at seven modules each, a five-module center guard, four right-side digits at seven modules each, and a three-module end guard. Unlike EAN-13, EAN-8 has no leading digit encoded indirectly through a parity pattern — all eight digits appear in the two four-digit halves.

Blank quiet zones are part of the symbol. The GS1 retail specification requires at least seven modules on both sides, so the complete minimum width is 67 + 7 + 7 = 81 modules. Artwork, borders, or nearby text must not enter those blank areas.

How the EAN-8 check digit works

Starting from the rightmost of the seven data digits, multiply digits alternately by 3 and 1. Add the products; the check digit is the value from 0 to 9 that brings the sum to the next multiple of ten. The complete eight-digit number is then verified the same way.

Guide: the same arithmetic is worked through for every GTIN length in How GTIN check digits are computed; all explanations are listed under all guides.

Published worked example — data digits 7351353:

Check digit: 7 → complete EAN-8: 73513537

The result is computed at build time by the same tested function used in the generator. The source vector is the EAN-8 example in the International Article Number reference.

The weighted sum, position by position

The engine's steps function walks the published vector at build time; the digits, weights, products and sum below are its output. The rightmost data digit takes weight 3 and the weights alternate leftwards from there.

Position Data digit Weight Product
1 7 3 21
2 3 1 3
3 5 3 15
4 1 1 1
5 3 3 9
6 5 1 5
7 3 3 9
Sum of products 63

The next multiple of ten above 63 is 70, so the check digit is 70 − 63 = 7; a sum that already ends in zero takes check digit 0.

A fictional seven-digit input, 2048119, runs through the same arithmetic: 2 × 3 + 0 × 1 + 4 × 3 + 8 × 1 + 1 × 3 + 1 × 1 + 9 × 3 gives 6 + 0 + 12 + 8 + 3 + 1 + 27 = 57, the next multiple of ten is 60, and the complete EAN-8 is 20481193.

A matching check digit catches common transcription errors, but it does not consult a GS1 registry. Use the check digit calculator to work through the weights for other GTIN lengths or a pasted column.

More EAN-8 check-digit examples

These additional results are computed at build time, including the leading-zero case. They demonstrate the arithmetic only; the numbers are not claimed as allocated product GTINs.

Seven data digits Computed check digit Complete EAN-8
7351353 7 73513537 (published vector)
0000000 0 00000000
1234567 0 12345670
5512345 7 55123457
9638507 4 96385074
0421000 9 04210009

Compute mode and verify mode: the digit count decides

After removing spaces and hyphens the validator counts digits, and the count alone selects the mode: seven digits are data digits whose check digit is computed and appended; eight digits are a complete number whose final digit is verified against the first seven; any other count is refused with the reason. It never guesses. These are its own notes for the published vector:

Seven digits entered (7351353), mode computed:

You entered 7 digits — the check digit 7 was computed and appended, making 73513537.

Eight digits entered (73513537), mode verified:

You entered all 8 digits — the check digit 7 was verified against the first 7 and is correct.

Both routes end in the same payload, 73513537, and the notes beneath the barcode say which, in the validator's own words — read them before you download. Separators are removed before counting, so 7351 353 produces 73513537. A refusal quotes the count it saw — 6 digits (735135): “A EAN-8 needs 7 digits (check digit computed) or 8 digits (check digit verified) — you entered 6.” — and no payload reaches the renderer, so nothing is drawn.

A corrupted digit, caught in verify mode

Change one data digit of the published vector — here position 4, from 1 to 6, giving 73563537 — and enter all eight. The validator recomputes the check digit from the first seven, 7356353, finds that they require 2, compares that with the 7 supplied, and reports:

Check digit mismatch: for 7356353 the final digit must be 2, but you entered 7. Fix the number, or enter only the first 7 digits to have the check digit computed.

The message names the digit the first seven require without claiming it is the right fix: the validator cannot see which of the eight digits was mistyped, only that the set is inconsistent. A wrong check digit usually means a typo somewhere in the data, and overwriting the last digit would turn a detectable error into a structurally valid wrong number — so mismatches are reported, never repaired, and the message offers two routes: correct the number, or enter only the seven digits you trust.

The arithmetic catches every single-digit error — weights 1 and 3 share no factor with 10, so changing one digit always moves the sum off its multiple of ten — a property the engine's tests exercise exhaustively on a cited EAN-13 vector. It does not catch every transposition: where two adjacent digits differ by exactly five, exchanging them moves the weighted sum by a multiple of ten. The fictional data digits 6183052 sum to 57 and 1683052 to 47, and both take check digit 3. A matching check digit is evidence of consistency, not proof of the number you intended.

GS1 print dimensions and quiet zones

The values below come from the GS1 Ireland EAN-8 specification and the GS1 Sweden size guide. They describe retail point-of-sale use; a final package still needs a physical test scan.

Property At 100% magnification Allowed (80–200%)
Module width (X-dimension) 0.330 mm 0.264–0.660 mm
Overall nominal symbol 26.73 × 21.31 mm 21.38 × 17.05 to 53.46 × 42.62 mm
Bar height 18.23 mm 14.58–36.46 mm
Left quiet zone 7 modules (2.31 mm) always ≥ 7 × module width
Right quiet zone 7 modules (2.31 mm) always ≥ 7 × module width

The nominal width closes exactly: 81 modules including the quiet zones × 0.330 mm = 26.73 mm. Scale the SVG proportionally rather than stretching one axis, keep its white margins, print at 100% scale, and scan the final substrate with the hardware that will read it in use.

Verified before download

The tool first accepts exactly seven or eight digits. It computes a missing check digit or verifies the supplied one using this site's own GTIN arithmetic, then passes only the complete eight-digit payload to pinned JsBarcode. The displayed SVG is rasterized and decoded with independent ZXing code; a mismatch or unreadable render is withheld. PNG pixels are decoded again before download. These checks protect the generated files, not the future print — see the accuracy and methodology page for the full boundary.

Two further checks sit inside that pipeline. Before the rendered bars are decoded, the accepted payload is re-verified by an independent recomputation of its check digit — for 73513537 the cross-check reports consistent, and a disagreement would show an error instead of a barcode. After rendering, the decoder's verdict has 2 failure reasons, each named in the generator:

  • decode-failed — the independent reader could not read the rendered bars at all.
  • payload-mismatch — it read a payload different from the validated one.

Under every one of them the preview and every download stay withheld.

Checking a column of GTIN-8s

The check digit calculator applies the same engine to a pasted column, line by line. Its default mode reads each line by digit count: 8 digits are verified as a complete GTIN-8 and 7 have their check digit appended — just as this page does — while the other GTIN families are read by the same rule, and any other count is reported invalid with a message that itself lists which counts are complete numbers and which get a check digit appended. This short list — the published vector, its corrupted copy, a fictional seven-digit number, and a five-digit fragment — was processed at build time:

  • 73513537 — read as GTIN-8, status valid: Check digit 7 is correct.
  • 2048119 — read as GTIN-8, status completed: Check digit 3 appended.
  • 73563537 — read as GTIN-8, status wrong-check-digit: Check digit should be 2, not 7.
  • 73513 — read as unknown, status invalid: 5 digits — not a GTIN length. Complete numbers have 8, 12, 13, or 14 digits; 7- and 11-digit lines get their check digit appended.

Summary: 1 valid, 1 completed, 1 with a wrong check digit, 1 invalid, out of 4 lines. A row with a wrong check digit has its corrected number offered in a separate field and never written over the input. Choosing between this mode and the explicit data-only mode is the subject of Bulk GTIN validation modes.

EAN-8 compared with EAN-13 and UPC-E

Use EAN-13 for the normal worldwide retail case and EAN-8 only when the package is too small for a compliant EAN-13. UPC-E is another compact symbol, derived under UPC numbering rules and commonly associated with North American use; it is not an alternate drawing of a GTIN-8. The number assigned to the product determines the symbol. If you are choosing a code for data that never goes through retail checkout, neither compact retail format is usually appropriate.

Where this validator stops

Math, not optics. The checks prove that the eight digits are consistent and that the rendered pixels decode to them. Whether a printed symbol scans depends on contrast, size, substrate, and preserved quiet zones; no browser check can certify ink, substrate, scaling, contrast, or quiet zones after printing, so a physical production sample must still be scanned. Symbols, not numbers. Generating an EAN barcode does not allocate or license the GTIN inside it — that is GS1's role — and a passing check digit says nothing about who holds the number. Do I need a GS1 barcode? answers the licensing question; the methodology page draws the full boundary.

Further reading

How GTIN check digits are computed covers every GTIN length; How the verifier decodes what you see explains what is withheld and why. All guides: /guides/.

EAN-8 FAQ

What is an EAN-8 barcode used for?

EAN-8 carries an eight-digit GTIN on very small retail products whose package or available print area cannot accommodate a standard EAN-13 symbol. It is a point-of-sale barcode, not a general-purpose code for arbitrary text.

Do I enter 7 digits or 8?

Either. Enter seven data digits and the tool computes and appends the eighth check digit. Enter all eight and it verifies the final digit, reporting a mismatch rather than silently changing your number.

Can I type spaces or hyphens in the number?

Yes. Spaces and hyphens are removed before the digits are counted, so 7351 353 is read as 7351353 and becomes 73513537. Any other character is refused with a message saying an EAN-8 contains digits 0–9 only. That is the only normalization applied; digits are never padded, trimmed, or reordered.

Can I shorten my EAN-13 number into an EAN-8?

No. A GTIN-8 is separately allocated for a specific small product by a GS1 member organization. Removing digits from a GTIN-13, even if you compute a new check digit, creates a different number and does not give you the right to use it.

What size should I print an EAN-8?

At nominal size the X-dimension is 0.330 mm, the bar height is 18.23 mm, and each quiet zone is at least seven modules (2.31 mm). GS1 permits 80% to 200% magnification for the retail specification; scale width and height together and test the final print.

Is EAN-8 the same as UPC-E?

No. Both make compact retail symbols, but they use different numbering and encoding rules. Use the symbology assigned for your number and trading environment rather than converting by appearance.

Does a valid check digit mean the number belongs to me?

No. A correct check digit proves only that the eight digits are internally consistent. It does not prove GS1 allocation, ownership, uniqueness, or permission to sell a product under that GTIN.

Are the SVG, PNG, and PDF downloads free and private?

Yes. Validation, rendering, independent pixel decoding, and download all happen in your browser. There is no account, watermark, or upload of the number you enter.

Verify before production: structural validity is not allocation, and a decoded source file is not a certified print. Use a GS1-allocated GTIN-8 and test the final printed symbol with your own scanner.