How to make a barcode
- Choose the barcode type, or press one of the examples.
- Type the text or number. For UPC, EAN and ITF-14 you can leave off the last digit, the check digit, and the generator works it out.
- Set the bar width and height, or keep GS1’s sizes, and pick your printer’s resolution for the PNG.
- Check the notes and the scan check under the preview, then download the PNG or SVG.
- Print one copy at 100% scale and scan it before you print many.
Which barcode type to use
- UPC-A: 12 digits, the product barcode on packaging sold in the US and Canada.
- EAN-13: 13 digits, the product barcode used in most other countries; a UPC-A is an EAN-13 that starts with 0.
- EAN-8: 8 digits, for packs too small for an EAN-13.
- ITF-14: 14 digits for shipping cartons and cases, with thicker bars and bearer bars so it still reads when printed straight onto cardboard.
- Code 128: any letters, digits and keyboard symbols, up to 80 here. It packs pairs of digits into one symbol, so it is the narrowest choice for your own stock, shipping and asset labels.
- Code 39: capital letters, digits and a few symbols. It is wider than Code 128 and mostly used by older systems and badges that ask for it.
Where UPC and EAN numbers come from
Anyone can draw a barcode, but the number in a store barcode belongs to a brand. UPC and EAN numbers are built on a GS1 company prefix licensed to the brand owner, followed by the owner’s own item number and the check digit. Bar Code Graphics calls the prefix “the foundation used to create GTINs, including UPCs, that are associated with your business”, and notes that retailers and marketplaces increasingly check whether a UPC is tied to the right brand owner in the GS1 system, so you generally need your own GS1 license rather than reused or secondhand numbers. In the US the prefix comes from GS1 US, and other countries have their own GS1 offices. Once you have a number, this generator draws its barcode. For your own stock and asset labels you can use any numbering you like, usually in Code 128.
How the check digit works
The last digit of a UPC, EAN or ITF-14 is a check digit, worked out from the others so a misread digit makes the barcode fail instead of ringing up the wrong product. Starting from the right, multiply the digits by 3 and 1 in turn and add them up; the check digit is what brings the total up to the next multiple of 10. For the EAN-13 example, 501234567890, the weighted sum is 90, so the check digit is 0 and the full number is 5012345678900. For the UPC-A example, 61414112345, the sum is 78 and the barcode reads 614141123452. If you type a number with a check digit that doesn’t match, the generator tells you which digit it should be. Code 128 has a check symbol of its own, added automatically and never printed in the text.
Size, height and quiet zones
A barcode’s size is set by X, the width of its narrowest bar. For EAN-13 and UPC-A, GS1’s size guide allows X from 0.264 mm to 0.660 mm, with 0.33 mm as the standard 100% size, and the bars must be at least 22.85 mm tall at that width, more at a larger X and less at a smaller one, not counting the digits; EAN-8 needs 18.23 mm at 0.33 mm. GS1 UK warns against cutting the height down, because short bars are harder to scan. ITF-14 uses wider bars, X from 0.495 mm to 1.016 mm, at least 31.75 mm tall, with wide bars 2.5 times the narrow ones (GS1 General Specifications).
Every barcode also needs blank space on each side, the quiet zone, so the scanner can find where it starts and ends: 11 X on the left and 7 X on the right of an EAN-13, 9 X on each side of a UPC-A and 7 X for EAN-8 (GS1’s size guide), 10 X for ITF-14 and Code 128, and for Code 39 10 X or 0.1 in, whichever is wider. The generator includes them in the picture, so don’t crop the margins or print anything on them. The bearer bars above and below an ITF-14 stop a scan line that slips off the top or bottom from reading a wrong number; for printed labels, GS1 New Zealand asks for bars at the top and bottom at least twice the narrow bar’s width.
Printing at the right resolution
A printer can only print whole dots, so a bar 0.33 mm wide becomes whatever number of dots comes closest. At 300 dpi that is 4 dots, 0.339 mm; at 600 dpi, 8 dots, 0.339 mm; but at 203 dpi, common on thermal label printers, it is 3 dots, 0.375 mm. A picture made at another resolution and scaled by the printer ends up with some bars a dot wider than others, which is what makes cheap labels hard to scan. The PNG here is drawn for the resolution you pick, every bar a whole number of dots, and the note under the preview shows the bar width you will really get. The file also records its resolution, so label and office programs place it at its real size. When you print, choose 100% or actual size, never “fit to page”.
Colors that scan
Bar Code Graphics explains that most barcode scanners read with a red laser, which sees red as white, so a barcode needs dark bars and light spaces under red light, not just to the eye. The generator works out that contrast from how much red light each color reflects: black bars on white give 100%, dark blue (#1e3a8a) 99%, but red (#ff0000), orange (#ff8800) and yellow (#ffcc00) all give 0%, the same as no bars at all. It warns below 80%, and the scan check reads the bars through the red channel only, the way a scanner sees them. Light bars on a dark background fail too, and a transparent background only works when the barcode goes on something light.
The scan check
After every change the generator draws the barcode as it will print, takes one line of pixels across the middle of the bars as a scanner would, and decodes it. Scan check passed means it got back exactly what you typed. It catches typos in the settings, colors scanners can’t see and bars too small to tell apart, but a printer, the paper and the scanner can still add problems of their own, so scan one printed copy before you print hundreds.
Many barcodes, labels and sheets
Paste a list of up to 300 values, one per line, to make a barcode for each with the same type, size and colors. Download them all in a ZIP of PNG or SVG files, numbered in the order of your list, ready for label software, a spreadsheet or a print shop. Or press Print a sheet to print them on plain paper or label sheets at their real size. If a line can’t be encoded, such as a UPC with a wrong check digit, the generator names the line so you can fix it.
Privacy
Barcodes are made in your browser. What you encode is never sent to this website; only the look you choose, such as the resolution and colors, is remembered on this device.
Frequently asked questions
Is this barcode generator free?
Yes. There is no sign-up, no watermark and no limit, and the barcodes are yours to use on products, labels and documents. They are made in your browser, so what you type is never uploaded.
Which barcode type should I use?
For products sold in stores, use the type your retailers ask for: UPC-A in the US and Canada, EAN-13 almost everywhere else, or EAN-8 on very small packs. For shipping cartons of a product, ITF-14. For your own inventory, shipping and asset labels, Code 128, which takes letters, digits and symbols and makes the narrowest barcodes. Code 39 is for older systems that ask for it.
Can I make my own UPC or EAN number?
You can draw a barcode for any number, but a UPC or EAN for products sold in stores is meant to start with a GS1 company prefix that GS1 licenses to your company, followed by your own item number and the check digit. Retailers use the number to look up the product, so ask the stores or marketplaces you sell through what they accept before you print.
What is a check digit?
The last digit of a UPC, EAN or ITF-14, worked out from the others so a scanner can tell when a digit was misread. Weight the digits 3 and 1 alternately from the right, add them up, and the check digit brings the total up to the next multiple of 10: for 501234567890 the weighted sum is 90, so the check digit is 0. Type the number without it and the generator adds it; type it with one and the generator checks it.
What size should a barcode be?
For EAN-13 and UPC-A, GS1 sets a bar width (X) of 0.264 to 0.660 mm, with 0.33 mm as the standard 100% size, and bars at least 22.85 mm tall at that width. Do not shorten the bars below that: the generator shows the GS1 minimum for the width you pick. Code 128 and Code 39 labels can be smaller, as long as your scanners read them.
Should I download PNG or SVG?
SVG is a vector file that stays sharp at any size and opens at its real size in millimeters, which suits design programs and print shops. PNG suits documents, label software and websites; this one is made for the resolution you pick, with every bar a whole number of printer dots, and it carries that resolution so it prints at the right size.
Why won’t my barcode scan?
The usual causes are bars that are not dark enough under a scanner’s red light (red, orange and yellow bars look like the background), the blank margins on either side cut off or printed over, bars printed too small or squashed, and a page printed with “fit to page” instead of at 100%. Watch the scan check and the notes under the preview, and test one printed copy.
Can I make many barcodes at once?
Yes. Paste up to 300 values, one per line, under Many barcodes at once. Each becomes a barcode with the same type, size and colors, and you can download them all as PNG or SVG files in one ZIP, or print them on a sheet at their real size.