EAN-13 barcode generator
The retail barcode on almost every product with a price. Paste twelve digits and the thirteenth is computed for you; paste all thirteen and it is verified instead, and if it is wrong you are told what it should have been.
Twelve digits in, thirteen digits out
An EAN-13 carries thirteen digits, and the last one is arithmetic rather than data. Multiply the digits alternately by one and three, add them, and the check digit is whatever makes the total a multiple of ten. A scanner recomputes it on every read, which is how a smudged symbol gets rejected instead of silently becoming a different product.
This page will compute it or check it. Both matter: computing saves you the arithmetic, and checking catches the transcription error in a number somebody read off a spreadsheet. A barcode with a deliberately wrong check digit is also a useful test fixture, so you can still make one, as long as you did it on purpose and know that is what you have.
Why it is always the same width
An EAN-13 symbol is 95 modules wide whatever the number, and that is measured from this encoder rather than quoted. Its structure is fixed: a guard, six digits, a center guard, six digits, a guard. Nothing about the data changes the geometry, which is why retail scanners can be fast and cheap.
Only twelve digit positions are drawn. The first digit is not printed as bars at all; it is encoded in which parity pattern the left-hand six digits use. That is the trick that fits thirteen digits into twelve slots, and it is the reason the leading digit of an EAN-13 sits outside the bars on a printed label.
EAN-13, EAN-8 and the small package
EAN-8 exists for products too small to carry the full symbol: seven digits and a check digit, 67 modules instead of 95. It is not a shortened EAN-13 and the numbers are not interchangeable, because an EAN-8 is allocated as its own number by GS1 rather than derived from a longer one.
Use it when the package genuinely cannot fit an EAN-13 at a printable size. Shrinking an EAN-13 below its specified magnification is the more common response and the worse one: the bars get narrower than the scanner's resolution and the read rate falls off a cliff.
Getting a number you are allowed to use
This page encodes the number you give it and cannot tell you whether it is yours. Real retail numbers are issued by GS1, which allocates your company a prefix; the rest identifies your product. Encoding an invented number produces a technically perfect barcode that may already belong to somebody else.
For testing, that does not matter and inventing numbers is the right move. For anything that will pass a checkout, the number has to come from GS1 first.
Questions
What is the difference between EAN-13 and UPC-A?
In the printed symbol, nothing but the label underneath. A UPC-A is an EAN-13 whose leading digit is zero, and the two produce the same 95 modules and the same guard patterns. Decoders report a UPC-A as an EAN-13 for that reason, and they are right to: the distinction does not exist in the image.
My check digit does not match what another site says.
Check which end you are counting from and whether a leading zero was dropped. The alternating one-and-three weighting starts from the right, so removing or adding a leading zero changes every weight and therefore the answer. A twelve digit number and the same number with a zero in front have different check digits.
Can I make an EAN-13 with a wrong check digit on purpose?
Yes, and it is a fixture worth having. Paste thirteen digits whose last one is wrong and you are told the correct value rather than being blocked. A scanner that accepts it has a defect you want to find in testing.
How small can I print it?
The symbology is specified with a nominal size and a permitted magnification range, and going below it is what breaks scanning in practice. Take the SVG and scale that, rather than enlarging a PNG, so the bar edges stay exact at whatever size you settle on.
More barcode generators
UPC barcode generator · Code 128 barcode generator · Code 39 barcode generator · GS1-128 barcode generator · ITF-14 barcode generator · Data Matrix generator · Barcode generator · QR code generator