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. Either way, the check digit is re-derived independently after encoding before the barcode is shown.
EAN-13 generator
Generated locally in your browser — nothing you type is transmitted or stored.
Generating a barcode does not license the number
This is the most important thing on this page. An EAN-13 symbol is just a picture of thirteen digits. What makes a retail barcode work at checkout is not the picture — it is that the digits inside it are a GTIN allocated under a company prefix licensed from GS1. If you intend to sell a product in stores or on marketplaces, you need numbers licensed through your local GS1 member organization; many retailers verify them against the GS1 registry. Use this generator to render numbers you are entitled to use — licensed GTINs, internal codes for closed systems, or test symbols — not to invent retail numbers.
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.
Print size and quiet zones
An EAN-13 needs light margins — quiet zones — on both sides: per GS1 size guidance, at least 11 module widths on the left and 7 on the right. For consumer items the module width (X-dimension) should stay between 0.264 mm and 0.660 mm, with 0.330 mm as the recommended target and about 22.85 mm of bar height at that size (figures from the GS1 size guide). The downloaded SVG includes the quiet zones; keep them when you place it in artwork — cropping them off is the most common self-inflicted scan failure.
EAN-13, GTIN-13, and the rest of the family
The number inside an EAN-13 symbol is a GTIN-13. The same mod-10 arithmetic protects UPC-A (a 12-digit GTIN — a UPC-A with a leading zero is 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.
EAN-13 FAQ
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.
Can I just make up a number for a product I want to sell?
No. Stores and marketplaces look the number up in the GS1 registry; an unlicensed number will collide with or fail lookup against real products. Retail EAN-13 numbers come from a GS1 company prefix licensed through your local GS1 member organization. This tool encodes whatever valid digits you give it — it cannot register them.
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.
What size should I print an EAN-13?
GS1 size guidance for consumer items puts the module width (X-dimension) between 0.264 and 0.660 mm with 0.330 mm as the target, and bar height around 22.85 mm at that target. Downscaling below the minimum, or trimming the light margins, is the classic cause of checkout scan failures.
Is anything I type sent anywhere?
No. Validation, check-digit math, 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.