What an EAN-13 encodes
An EAN-13 carries a 13-digit Global Trade Item Number (GTIN-13). It identifies one product variant: one size, flavour and pack of one product from one brand owner. It contains no price, description or stock level; the retailer's system looks those up from the number. It is the standard retail barcode in Australia, New Zealand, Europe and most of the world, and it scans at almost every checkout.
The structure of the number
The 13 digits are a GS1 company prefix, an item reference and a check digit. The prefix starts with a GS1 country code (93 for Australia, 94 for New Zealand, 50 for the UK) that shows which GS1 office issued it, not where the product is made. The length of the company prefix depends on how many numbers the company licensed; the item reference fills the rest. The final digit is the check digit.
The check digit
Starting from the right of the first 12 digits, multiply the digits alternately by 3 and 1, add the results, and take the number needed to reach the next multiple of 10. For 400638133393: the weighted sum is 89, so the check digit is 1, giving 4006381333931. A single wrong digit, and most swapped pairs, change the sum, so the scanner rejects the read instead of finding the wrong product. Enter 12 digits and the tool adds the check digit; enter 13 and it confirms it, and if it does not match it says what it should be.
Size and quiet zones
GS1 defines EAN-13 at 100% magnification as 0.330 mm per module, 37.29 mm wide including the quiet zones, with bars 22.85 mm tall (not counting the digits). The permitted range is 80% to 200%: at 80% the module is about 0.264 mm. The quiet zone is 11 modules on the left and 7 on the right. The tool sizes the barcode by magnification so these rules are followed; it warns if you go below 80%. Larger is better for scanning, and GS1 offices recommend more than the minimum where packaging allows.
Where to put it
On packaging, place the barcode on the back or base, away from seams, folds and edges, with the bars vertical (picket fence) on flat surfaces. On curved packs, rotate it so the bars run around the curve. Avoid placing it under a flap or wrap, or where a price sticker is likely to go.
Printing tips
- Print at 100%. In the print dialog choose "Actual size" or 100%, never "Fit to page". Scaling changes the bar widths, and a barcode printed at 94% can fall outside the reader's tolerance.
- Use vector files where you can. The SVG and PDF downloads are vector: bars stay sharp at any size and the PDF page is exactly the barcode's size. Use PNG for software that only takes images, at 300 dpi for office printers and 600 dpi for thermal label printers.
- Dark bars, light background. Black on white scans best. Dark blue and dark green work; red, orange and yellow bars are invisible to red-light laser scanners. The tool warns when the contrast is low.
- Keep the quiet zone. The clear margin either side of the bars is part of the symbol. Do not let text, a box edge or a label edge into it.
- Test before a print run. Print one, then scan it with the scanner your customers or staff will actually use, and with a phone app, before printing hundreds.
Why barcodes fail to scan
- Too small or scaled. Bars printed narrower than the reader can resolve, or a file squashed in one direction when it was placed in artwork.
- No quiet zone. Text, a border or the edge of the label too close to the first or last bar.
- Low contrast. Grey on grey, coloured bars on a coloured background, or bars printed on a shiny or transparent surface.
- Ink spread and blur. Inkjets on absorbent paper and worn thermal printheads widen the bars. Print a test and check the bars look crisp; for thermal printers, use 600 dpi or the printer's native resolution.
- Curved or creased surfaces. Bars wrapped around a narrow bottle or across a fold. Turn the barcode so the bars run with the curve (picket fence across a flat face, ladder around a cylinder).
- Wrong data. A check digit that does not match, or a number with the wrong length. This tool checks both before it draws anything.
Which download to use
- SVG for designers and packaging artwork. It is a vector file sized in millimetres, so it opens at the right size in Illustrator, Inkscape, Affinity and Canva, and stays sharp when printed. Do not stretch it in one direction.
- PDF when you send a file to a printer or place it in a print layout. The page is exactly the size of the barcode, quiet zone included, so it can be placed at 100% without measuring.
- PNG for software that only accepts images: label printer apps, spreadsheets, online stores and word processors. Choose 300 dpi for office printers and 600 dpi for thermal label printers. The tool rounds each module to a whole number of pixels so the bars stay crisp, which can make the PNG slightly smaller or larger than the millimetre size; the size line under the preview shows the result. Tick "transparent" to drop the background for placing on coloured artwork, but keep a light background behind the bars when printed.
To make many at once, use the ZIP option below the generator: paste one value per line or load a CSV and download PNG or SVG files named after each value.
How this tool works
Barcodes are drawn in your browser with bwip-js, an open-source (MIT) port of Barcode Writer in Pure PostScript, and PDFs are written with pdf-lib. Nothing you type is uploaded, and the page works offline after the first visit. Single barcodes are free in every format with no watermark. Paid licences cover print-ready label sheets and large batches; see the box above.