Skip to the tool
UPC Generator

UPC generator

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.

Format

UPC-E only fits numbers with zeros in set places, and this one has too few.

1.468 in (37.29 mm) wide by 1.036 in (26.32 mm) tall, clear space included

UPC-A barcode 400123456782

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.

  • Narrow bar: 0.33 mm (13 mil)
  • Clear space: 0.117 in (2.97 mm) left, 0.117 in (2.97 mm) right at minimum
  • PNG at 300 dpi: 452 by 312 dots, narrow bar 4 dots, so it prints at 0.339 mm

Bar height follows the size until you change it.

More options
Show sizes in

Your number, bar by bar

Each digit takes seven thin columns of black or white. Pick a digit to see which bars carry it.

Number system 4, left set. Pattern 0100011. Runs from module 3 to 10.

The check digit sum for your number

4 x 3 + 0 x 1 + 0 x 3 + 1 x 1 + 2 x 3 + 3 x 1 + 4 x 3 + 5 x 1 + 6 x 3 + 7 x 1 + 8 x 3 = 88. The next ten up is 90, and 90 minus 88 leaves 2.

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.

What a scanner needs from a UPC

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.

Make a UPC barcode in three steps

  1. Type 11 digits, or all 12 if you have the full number. The preview redraws as you type.
  2. Choose a size. Keep 100 percent unless your pack is too small or your printer needs bigger bars. Bar height follows the size until you change it.
  3. Download SVG or PDF for a designer or a page layout, or PNG for a label printer. Print the test sheet and check that the 50 mm ruler measures 50 mm on paper.

UPC sizes GS1 allows

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.

Five UPC sizes from 80 to 200 percent, with bar height and width
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)

Why bars are rounded to whole printer dots

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.

What the opening digits say

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.

What the opening digits of a UPC say
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.

The check digit, worked through

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-A or UPC-E

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.

Other barcodes for the same product

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.

Reading the number on a package

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.

Other barcodes, by the job they do

Numbers for products in a store

Cartons and shipping

  • ITF-14 generator, the 14 digit carton code, built from your item number with bearer bars.
  • Code 128 generator, letters and numbers in a short barcode, for stock, bins and paperwork.

Your own stock and asset labels

  • SKU generator, a whole list of stock codes from your product options, with a CSV file.
  • Code 39 generator, the older format some label systems and contracts still name.

Small parts and long text

Not sure which format

  • Barcode generator, all formats in one place, and it shows which ones can hold your text.

UPC barcode questions

Can I make my own UPC code for free?

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.

Why did the generator add a digit to my 11 digits?

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.

What UPC number can I use for internal stock?

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.

Will my UPC barcode scan?

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.

Should I download SVG, PNG or PDF?

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.

Is a UPC the same as a GTIN?

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.

7 source documents

  1. GS1: General Specifications, Release 26.0, sections 5.2, 5.12.3.1 and 7.9, fetched 2 November 2026
  2. GS1: GS1 Company Prefix list, fetched 2 November 2026
  3. GS1 US: How to get a UPC barcode, with prefix pricing, fetched 2 November 2026
  4. GS1: How to calculate a check digit manually, fetched 2 November 2026
  5. Walmart Marketplace: Choose a product identifier, fetched 2 November 2026
  6. Amazon: GTIN guide, fetched 2 November 2026
  7. Amazon: Selling generic products, GTIN exemption timing, fetched 2 November 2026