Free, in your browser, no upload
EAN-13 barcode generator with check digit
Choose a fileType the first 12 digits of your GTIN-13 and we add the check digit, or type all 13 and we verify it. The barcode follows the GS1 layout, from the guard bars to the digits printed under each group.
- Check digit added or verified
- GS1 sizes from 80% to 200%
- Vector PDF and SVG for print
12 digits, or 13 with the check digit. Retail numbers come from GS1.
More QR and barcode tools
How to make an EAN-13 barcode
Get your GTIN-13
From your GS1 member organization: your company prefix plus an item reference for this product.
Type the number
Twelve digits and we add the thirteenth, or all thirteen and we check the last one. Spaces and hyphens are ignored.
Set the width, then the height
X = 0.330 mm is the standard 100% size, and 0.264 mm (80%) is the smallest except on thermal or laser label printers. The bar height does not change with X, so type the height for your X from the size table, such as 27.42 mm at 0.396 mm. Taller is fine. For a PNG on a label printer, take the width and height from the label printer table.
Download, then scan a proof
Place the PDF or SVG in your packaging design at 100% scale and keep the white margins around it, or send the PNG to your label printer at its own DPI. The scan check reads the image, not your print, so also scan the first printed proof.
GTIN-13: the number inside your EAN-13
The bars carry a GTIN-13, the number that identifies your product. A generator can draw your number but cannot issue it, because the company prefix it starts with comes from GS1. GS1 also asks for item references to be given out in order from zero, with no meaning built in, and recorded carefully.
| Part | Where | What it means |
|---|---|---|
| GS1 Company Prefix | The first digits | Licensed to your company by a GS1 member organization. |
| Item reference | The digits after the prefix | Chosen by your company for each product. With the prefix, it makes 12 digits. |
| Check digit | Digit 13 | Calculated from the first 12 digits; it catches most typing mistakes. |
The first three digits name the GS1 office that issued the prefix, not where the product was made: 890 is GS1 India, 800 to 839 GS1 Italy, 500 to 509 GS1 UK, 400 to 440 GS1 Germany. Books use 978 and 979, and 952 is kept by GS1 for examples, which is why our sample number starts with it. Our guide What is a 13-digit barcode? explains what each digit means, lists more prefixes and works out a check digit by hand.
Anatomy of an EAN-13 barcode
An EAN-13 symbol is 95 modules wide, plus its quiet zones. Twelve digits are drawn as bars; the first digit is not drawn on its own but hidden in the pattern of the left half:
| Part | Width | What it does |
|---|---|---|
| Left quiet zone | 11 modules | Blank space; the first digit is printed here |
| Start guard | 3 modules | Bar, space, bar: tells the scanner where the code starts |
| Left half | 6 digits x 7 modules | Digits 2 to 7, each in one of two patterns; the mix of patterns encodes digit 1 |
| Center guard | 5 modules | Splits the two halves |
| Right half | 6 digits x 7 modules | Digits 8 to 13, the last being the check digit |
| End guard and right quiet zone | 3 + 7 modules | Ends the code and keeps other print away |
That is why the first digit sits outside the bars, to the left. Guard bars extend a little below the others, and the digits sit between them.
Sizes from 80% to 200%
GS1 lets retail EAN-13 barcodes range from 80% to 200% of the nominal size and ties the bar height to the width: the minimum height is about 69.24 times X, and there is no maximum. The heights below do not count the digits printed underneath:
| Size | Bar width X | Width with quiet zones | Minimum bar height |
|---|---|---|---|
| 80% | 0.264 mm | 29.83 mm | 18.28 mm |
| 90% | 0.297 mm | 33.56 mm | 20.57 mm |
| 100% | 0.330 mm | 37.29 mm | 22.85 mm |
| 120% | 0.396 mm | 44.75 mm | 27.42 mm |
| 150% | 0.495 mm | 55.94 mm | 34.28 mm |
| 200% | 0.660 mm | 74.58 mm | 45.70 mm |
Cutting the height to fit a label is called truncation. GS1 allows it only when there is absolutely no room for a full-size barcode, because it stops scanners from reading the code at an angle.
Label printers: PNG widths that fit the dots
For packaging printed on a press, use the SVG or PDF: they keep the exact bar width you type, and 80% is the minimum size. A PNG is built from printer dots, so each bar width is rounded to whole dots at the PNG resolution you pick. Set the PNG resolution to your printer’s and type one of these widths, so the PNG keeps the width you typed:
| PNG resolution | Bar width X | Size | Bar height to type |
|---|---|---|---|
| 150 DPI | 0.339 or 0.508 mm (2 or 3 dots) | 103% or 154% | 24 or 35.5 mm |
| 203 DPI | 0.250 mm (2 dots) | 76%, on-demand printing only | 19 mm |
| 203 DPI | 0.375 mm (3 dots) | 114% | 26 mm |
| 203 DPI | 0.500 mm (4 dots) | 152% | 35 mm |
| 203 DPI | 0.626 mm (5 dots) | 190% | 43.5 mm |
| 300 DPI | 0.254 mm (3 dots) | 77%, on-demand printing only | 19 mm |
| 300 DPI | 0.339 mm (4 dots) | 103% | 24 mm |
| 300 DPI | 0.423 mm (5 dots) | 128% | 29.5 mm |
| 300 DPI | 0.508 mm (6 dots) | 154% | 35.5 mm |
| 300 DPI | 0.593 mm (7 dots) | 180% | 41.5 mm |
| 600 DPI | 0.296, 0.339, 0.381, 0.423, 0.466, 0.508, 0.550, 0.593 or 0.635 mm (7 to 15 dots) | 90% to 192% | 69.24 times X, rounded up to the next 0.5 mm |
Thermal and laser printers at 203 or 300 DPI cannot print 80% exactly; the nearest they get is about 76% or 77%. GS1 accepts 75% to 80% for this kind of on-demand printing only, as long as the label leaves room for an 80% barcode and the bars stay at least 18.28 mm tall. Do not type 0.264 mm for a PNG: at 203, 300 or 600 DPI it rounds to 76% or 77%, and bars typed at 18.28 mm come out about 17.3 to 17.6 mm tall. At the top end, 0.660 mm becomes 0.677 mm at 150, 300 or 600 DPI, over GS1’s 200% maximum.
Questions
How is the EAN-13 check digit calculated?
Multiply the first 12 digits by 1 and 3 in turn, starting with 1 on the left, add the results, and take the amount needed to reach the next multiple of 10. The generator does this for you and flags a wrong check digit.
How do I check if a 13 digit barcode is valid?
Type all 13 digits here and we verify the check digit, or scan a barcode from a photo with our reader, which checks the check digit of product numbers too. A correct check digit only shows the number was not mistyped; it does not show which company the number belongs to.
What does a 13 digit barcode starting with 0 mean?
It is a UPC-A number, the 12 digit code used in the US and Canada, shown with a 0 in front. The bars are exactly the same, so retail scanners read it either way. To make one in its 12 digit form, use the UPC barcode generator.
Can I make up my own EAN-13 number?
Not for products sold through retailers or marketplaces. The number must come from your GS1 prefix, or it may clash with another company’s product. For internal labels, use the Code 128 barcode generator instead.
How small can an EAN-13 barcode be?
At 80%, a bar width of 0.264 mm, it is about 29.8 mm wide with its quiet zones. For packs smaller than that, GS1 permits EAN-8 under set conditions, such as a printable area under 80 square centimeters. Thermal and laser label printers at 203 or 300 DPI may go down to 76% or 77%, which GS1 allows for on-demand printing only.
What is the difference between EAN-13 and GTIN-13?
GTIN-13 is the number; EAN-13 is the barcode that carries it on retail packs. To make a GTIN-13 barcode, type the number into the generator on this page and you get an EAN-13. The same GTIN can also appear in a QR code or GS1 DataMatrix.
Can I make an ISBN barcode for a book?
Yes. An ISBN-13 is an EAN-13 starting with 978 or 979: type the 13 digits, with or without the hyphens or spaces. Price add-on codes (EAN-5) are not supported.
What colors should an EAN-13 barcode be?
Black bars on a white background is safest. Retail scanners read with red light (GS1 measures print quality at 660 nm), so red, orange or yellow bars can vanish for the scanner, and a dark background hides the gaps.