EAN-13 Barcode Generator

EAN-13 is the retail barcode of the world outside North America — thirteen digits, the last of which is a check digit that scanners use to catch misreads. Enter 12 digits and this tool computes the check digit for you (and says so); enter all 13 and it verifies the one you typed. Below the generator, a live breakdown shows what each digit of your number means. Wherever this page says a number is valid, it means structurally valid — right length, right characters, check digit consistent — which is a property of arithmetic, not a license.

EAN-13

EAN-13 settings

12 digits (check digit computed for you) or 13 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 atfileconverters.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.

What each digit means — live breakdown

Type or paste any 12- or 13-digit number — from the generator above, a product in your hand, or a spreadsheet — and see it segmented. Runs locally; nothing is transmitted.

12 digits shows the check digit to append; 13 digits verifies the one you have. Spaces and hyphens are ignored.

  • GS1 prefix 400 — identifies the GS1 member organization that issued the company prefix, not the country of manufacture.
  • Manufacturer + product 638133393 — the licensed company prefix followed by the item reference. Where one ends and the other begins depends on the license length, so it cannot be read off the number itself.
  • Check digit 1 — matches the twelve digits before it.

4006381333931 is structurally valid: check digit 1matches its first twelve digits.

How thirteen digits fit into a twelve-digit symbol

An EAN-13 symbol is exactly 95 modules wide — a module being the width of its thinnest bar. A three-module guard pattern at each end and a five-module guard in the center frame two halves of six digits each, every digit occupying seven modules. Count that up and onlytwelve digits get bars of their own.

The thirteenth — the leading digit — is carried by a trick: the left-half digits can each be drawn from two different encoding alphabets, and the pattern of which alphabet is used across those six positions spells out the leading digit. Leading digit 0 uses a single alphabet throughout, which is why a UPC-A is literally an EAN-13 with a leading zero: same bars, same check digit. The right half uses a third alphabet, so a scanner always knows which half it entered first — EAN-13 scans upside down as reliably as right side up. The leading digit, having no bars, is printed to the left of the symbol inside the left quiet zone — the wider of the two margins. For the digits themselves, the breakdown panel above does the honest split: GS1 prefix, manufacturer + product region, check digit — and our13-digit barcode explainer covers the numbering system in more depth.

How the check digit works

Number the first twelve digits left to right and multiply them alternately by 1 and 3 (the second, fourth, sixth… digits get the 3). Sum the products; the check digit is whatever brings that sum up to the next multiple of ten.

Worked example — data digits 400638133393:

Check digit: 1 → complete EAN-13: 4006381333931

This figure is computed at build time by the same tested algorithm the generator runs in your browser, so the page cannot drift from the code.

The check digit catches every single-digit typo and most adjacent-digit swaps — that is its whole job. It is why this tool never silently replaces a wrong 13th digit: a mismatch usually means one of the other twelve digits is wrong, and "correcting" the check digit would turn a detectable error into a perfectly valid wrong number. To work the algorithm by hand on any GTIN length, use the check digit calculator.

Print-exact dimensions, from the GS1 specification

These figures come from the GS1 General Specifications (the standard behindGS1's EAN/UPC symbology page), as published by GS1 member organizations — theGS1 Sweden size guide andGS1 Ireland's EAN-13 specification:

PropertyAt 100% magnificationAllowed (80–200%)
Module width (X-dimension)0.330 mm0.264 – 0.660 mm
Symbol incl. quiet zones37.29 × 25.93 mmscales linearly with magnification
Bar height22.85 mm18.28 – 45.70 mm
Left quiet zone11 modules (3.63 mm)always ≥ 11 × module width
Right quiet zone7 modules (2.31 mm)always ≥ 7 × module width

37.29 mm is not an arbitrary number: 95 modules of bars plus 11 + 7 modules of quiet zone make 113 modules, and 113 × 0.330 mm = 37.29 mm. The downloaded SVG is deliberately a little wider: the leading digit is printed in a blank 12-module strip inside the left margin, so the file spans exactly 125 module widths, with more than double the minimum quiet zone on the left. That makes the print math exact — set the SVG's width to 41.25 mm (125 × 0.330 mm) and every module comes out at precisely 0.330 mm; any width from 33.00 mm (80%) to 82.50 mm (200%) stays inside the allowed magnification band. Scale width and height together, always.

Quiet zones die in Word documents because white margins look like wasted space: the image gets cropped tight, or text and table borders crowd against its edges, and a scanner can no longer find where the symbol begins. The margins are part of the barcode — keep the ones that ship inside the download.

Verified before you download it

Every barcode this page shows has passed three checks, and it is worth being precise about what they do and do not cover. First, structure: the input must be exactly 12 or 13 digits, nothing else. Second, the check digit: computed for you or verified against what you typed, with mismatches flagged, never repaired. Both checks happen before the drawing library receives the accepted payload, using this site's separately implemented and tested arithmetic. Third, the actual SVG is rasterized and decoded by ZXing, independently from JsBarcode; an unreadable or mismatched render is withheld. The PNG canvas is decoded separately before export. These checks cover generated files, not physical print quality. Themethodology page documents the full boundary.

The SVG that verification protects is free — worth saying plainly, because vector export is a common paywall on barcode sites. What none of this can verify is print quality: ISO/IEC 15416 grades a printed symbol on contrast, defects, and decodability, and those depend on your printer, ink, and substrate. We check the math; only a verifier or a real scanner can check the optics — test the printed result before production.

EAN-13, GTIN-13, and the rest of the family

The number inside an EAN-13 symbol is a GTIN-13 — one member of the GTIN family this site's13-digit barcode guide maps out. The same mod-10 arithmetic protectsUPC-A (a 12-digit GTIN — a UPC-A with a leading zerois the EAN-13 form of the same number), ITF-14 carton codes (GTIN-14), and the Bookland EAN that carries ISBNs with a 978/979 prefix — the breakdown panel above recognizes those prefixes when you paste a book's number. And if you are still deciding whether your product needs a licensed number at all, start withDo I need a GS1 barcode? For items sold only inside your own store — deli counters, store-packed goods, internal SKUs — thein-store barcode guide explains the restricted-circulation prefixes built for exactly that.

EAN-13 FAQ

What do the 13 digits of an EAN-13 mean?

Three segments. The first three digits are the GS1 prefix, identifying the GS1 member organization that issued the company prefix. The middle nine hold the licensed company prefix followed by the item reference — the split between those two varies with the license, so it cannot be read off the number. The last digit is a check digit computed from the other twelve.

Do I enter 12 digits or 13?

Either. With 12 digits the tool computes the 13th (the check digit) and tells you it did. With 13 digits the tool verifies the last one against the first twelve and flags any mismatch instead of silently accepting or "fixing" it.

Why does the tool say my 13th digit should be different?

Because the check digit you entered does not match the one the first twelve digits require under the GS1 mod-10 algorithm. The tool shows the digit that would make the number structurally valid, but it never applies the fix automatically: a mismatch more often means one of the other twelve digits is mistyped, and quietly correcting the last digit would convert a detectable error into a perfectly valid wrong number.

Can I use this barcode to sell on Amazon?

Not with an invented number. Amazon validates GTINs against the GS1 registry, and listings with numbers that fail that check can be blocked or removed — the same applies at Walmart and most large retailers. You need a GTIN allocated under a GS1 license, and then this tool can render it. If your product genuinely has no GTIN, apply for a GTIN exemption in Amazon Seller Central rather than generating a number.

What size should I print an EAN-13?

The nominal (100%) symbol is 37.29 × 25.93 mm with a module width of 0.330 mm, and GS1 allows 80% to 200% of that — modules from 0.264 to 0.660 mm, bar height from about 18.28 to 45.70 mm. Keep the quiet zones (11 modules left, 7 right) and never scale width and height separately.

Does the first digit tell me where a product was made?

No — a common myth. The leading digits identify the GS1 member organization that issued the company prefix, which is where the company registered, not where any product was manufactured.

Is the SVG download really free?

Yes — free, without a watermark, and without an account. SVG is a vector format, so it rescales to any print size without redrawing pixels, which is exactly what a print-bound barcode needs.

Is anything I type sent anywhere?

No. Validation, check-digit math, the digit breakdown, and rendering all run as JavaScript in your browser. Nothing is transmitted, logged, or stored; closing the page discards it.

Verify before production: this tool checks the math, not the optics — always test the printed result with your own scanner. Everything runs locally in your browser. See the methodology page for how the verification layer works.