Check digit2
Starts with 40: GS1 keeps this range for numbers used inside one company, so it will not collide with a product on a store shelf. Fine for your own stock labels. It cannot be sold through a retailer.
A UPC-A barcode carries 12 digits in 95 thin columns of black and white. Type 11 digits, and this UPC code generator works out the twelfth and gives you a file sized for print.
Check digit2
Starts with 40: GS1 keeps this range for numbers used inside one company, so it will not collide with a product on a store shelf. Fine for your own stock labels. It cannot be sold through a retailer.
1.468 in (37.29 mm) wide by 1.036 in (26.32 mm) tall, clear space included
Selling in stores or on a marketplace? Many want a number licensed to your company through GS1, from $30. Walmart checks every number against GS1's records, and Amazon points new brands to GS1 unless they hold an exemption. The route and the prices are in how to get a UPC code. A number you type here suits your own labels, internal stock, testing and mock-ups.
Bar height follows the size until you change it.
By the UPC Generator team. Drawn to the GS1 General Specifications, Release 26.0, with sample files read back by separate barcode decoders. Last updated 4 November 2026. How UPC Generator pages are made.
A checkout scanner measures the widths of bars and gaps, so a UPC only works if those widths survive printing. Barcode sizes are given by the narrow bar, also called a module, sometimes in mil, which is a thousandth of an inch. GS1 sets it at 0.33 mm, and allows 0.264 mm to 0.66 mm for retail checkout. That is the 80 to 200 percent range people mean when they talk about barcode size.
The scanner also needs empty space on both sides. A UPC-A wants 9 modules of clear space left and right, which is 2.97 mm at the target size. Artwork or a crop inside that space can stop a scan, so the hatched areas in the preview show exactly what to leave alone.
Width here includes the clear space. A shorter barcode is possible if your pack truly has no room. GS1 warns that cutting bar height removes the ability to scan from any angle.
| Size | Narrow bar | In mil | Bar height | Full width |
|---|---|---|---|---|
| 80% | 0.264 mm | 10.4 | 0.72 in (18.28 mm) | 1.17 in (29.83 mm) |
| 100% | 0.33 mm | 13 | 0.9 in (22.85 mm) | 1.47 in (37.29 mm) |
| 120% | 0.396 mm | 15.6 | 1.08 in (27.42 mm) | 1.76 in (44.75 mm) |
| 150% | 0.495 mm | 19.5 | 1.35 in (34.28 mm) | 2.2 in (55.93 mm) |
| 200% | 0.66 mm | 26 | 1.8 in (45.7 mm) | 2.94 in (74.58 mm) |
A printer cannot print part of a dot. A 0.33 mm bar on a 203 dpi thermal printer works out to 2.64 dots. If the file leaves that to the printer, some bars come out 2 dots wide and others 3. The bar widths are the data, so that unevenness is what makes a barcode hard to read.
The PNG download avoids it by drawing every bar to a whole number of dots at the resolution you pick. At 203 dpi the narrow bar becomes 3 dots, which prints at 0.375 mm, or 114 percent. At 300 dpi it becomes 4 dots, or 0.339 mm. The rounding never carries a size outside the GS1 range, and the PNG readout tells you what will actually come out of the printer. The file also records its resolution, so a page layout program places it at its true size.
GS1 gives each range of numbers a job. Reading a UPC, add an unseen zero to the front first, so a number starting with 4 falls in GS1's 04x range.
| UPC starts with | GS1 range | What it is for |
|---|---|---|
| 0, 1, 3, 6, 7, 8, 9 | 001 to 019, 030 to 039, 060 to 099 | Numbers licensed through GS1 US |
| 2 | 020 to 029 | Local schemes, such as store-packed food sold by weight |
| 4 | 040 to 049 | Use inside one company |
| 5 | 050 to 059 | Held back by GS1 US |
For stock you run yourself, use a number starting with 4, because it cannot match someone else's product. Do not copy a number from another company's packaging, and do not print a made-up number and present it as a real product code. The full EAN-13 prefix reader covers numbers from outside North America.
Take 03600029145, the number GS1 uses in its own check digit example. Starting from the right-hand digit, multiply alternately by 3 and 1, and add the results: 0 x 3 + 3 x 1 + 6 x 3 + 0 x 1 + 0 x 3 + 0 x 1 + 2 x 3 + 9 x 1 + 1 x 3 + 4 x 1 + 5 x 3 = 58. The next multiple of ten is 60, and 60 minus 58 is 2, so the full number is 036000291452.
The sum for your own number updates as you type. For numbers you only want to test, the check digit calculator handles EAN, GTIN-14, SSCC and ISBN too.
UPC-E is a shorter barcode for packs too small for UPC-A. It leaves out zeros in set positions, so only numbers with those zeros can use it. The number 012345000065 squeezes down to 01234565, and a scanner rebuilds the full 12 digits from it. Most numbers do not fit, and the tool says so when yours does not.
A case of your product needs its own number and a sturdier symbol, which the ITF-14 carton barcode generator builds from your UPC. For bins and shelves, a Code 128 label holds letters as well as digits. If you are still deciding whether you need a licensed number, how to get a UPC code sets out the route and the costs. The number itself is explained in what a UPC code is.
If you are copying a number from an existing product, where the UPC code is on a product shows which digits to type and which to leave out. The number itself is a GTIN-12. What a GTIN is explains how it relates to the EAN on an imported product and to the code on its shipping case. A phone camera is enough to scan a test print before you commit to a run.
You can make the barcode for free, right here. The number is a separate matter. A number nobody licensed is fine on your own stock labels. A retailer that checks GS1 records, as Walmart Marketplace does, will reject it. Amazon points new brands to GS1 too, unless they hold a GTIN exemption. Licensed numbers run from $30 for one to $10,500 for the largest prefix on GS1 US's price list of 2 November 2026.
The twelfth digit is the check digit, worked out from the first 11. Every UPC needs one, and a scanner rejects the code if it does not add up. If you type all 12 and the last one is wrong, you get an error and the right digit to use.
Use one that starts with 4. GS1 keeps that range for numbers used inside one company, so it cannot clash with a product on a store shelf. The internal-use button fills one in for you, with the correct check digit.
Sample files from this UPC generator are read back by separate decoders, ZXing and Apple's Vision framework, and they read correctly. Those tests stop at the file. Your printer and label stock still matter, so print the test sheet and scan it with the scanner you will use.
SVG or PDF for packaging and page layouts, because they stay sharp at any size. PNG for label printers and office programs. Set the PNG to your printer's resolution under More options so each bar lands on whole printer dots.
A UPC-A carries a GTIN-12. GTIN is the name GS1 uses for the number, and UPC is the name of the barcode that carries it in North America.