A UPC barcode is the rectangular pattern of black and white lines printed on nearly every product sold in North American retail stores. The lines encode a 12-digit number that uniquely identifies the product, its manufacturer, and its packaging. When a cashier scans an item, the scanner reads those lines, translates them into that 12-digit number, and the store’s system instantly pulls up the product name, price, and inventory data.
What the 12 Digits Mean
Every standard UPC (called UPC-A) contains exactly 12 digits. The first six to ten digits form the GS1 Company Prefix, which identifies the company that makes or sells the product. The next set of digits is a product number that the company assigns to each individual item, covering specifics like size, flavor, or color. The final digit is a check digit, a mathematically calculated number that lets the scanner confirm the code was read correctly.
This 12-digit number is technically known as a GTIN-12 (Global Trade Item Number). You’ll sometimes see “GTIN” used interchangeably with “UPC” in wholesale portals, online marketplaces, and shipping systems. They refer to the same thing. Outside North America, the standard format is a 13-digit version called EAN (European Article Number), or GTIN-13. Most modern scanners read both formats without any issue.
How a Scanner Reads the Lines
A barcode scanner shines a beam of light across the printed bars. The dark bars absorb light while the white spaces reflect it. The scanner’s sensor detects the pattern of reflected and absorbed light, measuring the width of each bar and space. Each character in the 12-digit number is represented by a specific combination of bar and space widths. The scanner converts that pattern into the corresponding digits, then sends the number to whatever system is connected, whether that’s a point-of-sale register, a warehouse inventory tool, or a shipping platform.
The process takes milliseconds. Guard bars on the left, center, and right edges of the barcode tell the scanner where the code starts, where it splits, and where it ends, so the item can be scanned in any orientation.
UPC-A and UPC-E
The full-size barcode you see on cereal boxes, bottles, and most packaged goods is UPC-A, displaying all 12 digits. Some products are too small to fit that symbol. Lip balm tubes, chewing gum packs, and small cosmetic items often use UPC-E instead, a compressed version that shows only eight digits by suppressing the zeroes in the number. Both formats encode the same underlying product identifier. A scanner reading a UPC-E code expands it back to the full 12 digits internally.
Where UPC Barcodes Are Required
Most brick-and-mortar retailers in the United States and Canada require a UPC on every product before it can be stocked on shelves. Major online marketplaces like Amazon, Walmart.com, and Target also require a valid GTIN to list products in their catalogs. Grocery chains, big-box stores, and distributors use UPCs not just for checkout but for tracking inventory across warehouses, triggering automatic reorders, and managing returns.
If you sell exclusively at farmers markets, through your own website, or in very small independent shops, you may not need one. But the moment you approach a mainstream retailer or large e-commerce platform, a UPC becomes a baseline requirement.
How to Get a UPC for Your Product
UPC numbers are issued through GS1, the global standards organization that manages the system. In the United States, you register through GS1 US, which assigns you a Company Prefix. That prefix is yours to use across all your products. You then assign the remaining digits to each individual item you sell.
GS1 US pricing is based on how many products you need to barcode:
- 1 product: $30 initial fee, no annual renewal
- Up to 10 products: $250 initial fee, $50 per year
- Up to 100 products: $750 initial fee, $150 per year
- Up to 1,000 products: $2,500 initial fee, $500 per year
- Up to 10,000 products: $6,500 initial fee, $1,300 per year
- Up to 100,000 products: $10,500 initial fee, $2,100 per year
Once you have your prefix and assign product numbers, you generate the actual barcode image (the printable lines) using barcode generation software or through a graphic designer. The image gets placed on your product packaging or label. Many packaging printers handle this step as part of the label design process.
Third-Party Barcode Sellers
You’ll find websites selling individual UPC numbers for a few dollars each. These sellers typically purchased large blocks of prefixes years ago and resell numbers from that pool. The prices are dramatically lower than going through GS1 directly, but there are real tradeoffs. Some retailers and marketplaces reject barcodes that don’t trace back to a GS1 prefix registered in your company’s name. Amazon, for example, may verify that the GS1 Company Prefix matches your brand. If it doesn’t, your listing could be blocked. For products headed to major retail, registering directly with GS1 avoids that risk.
Printing and Placement
A barcode that won’t scan is useless, so print quality matters. The bars need sharp edges, sufficient contrast against the background, and a minimum size to be reliably read. GS1 specifies that a standard UPC-A symbol should be at least 1.469 inches wide by 1.02 inches tall at its nominal size, though it can be scaled down to 80% of that for smaller packages. Printing on a curved surface, a dark background, or a reflective material can cause scanning failures.
Most products place the barcode on the back or bottom of the package, away from seams and folds. Retailers prefer a flat, unobstructed surface so checkout scanners can read the code on the first pass. If your packaging uses dark colors, printing the barcode inside a white rectangle ensures enough contrast for reliable scanning.
UPC Barcodes vs. QR Codes
UPC barcodes are one-dimensional, encoding data in a single horizontal row of lines. QR codes are two-dimensional, storing information in a grid of squares that can hold much more data, including URLs, text, and other formats. Retailers still use UPCs at checkout because the infrastructure is built around them and they scan faster in high-volume environments. QR codes show up more often in marketing, packaging that links to digital content, and mobile payment systems. The two serve different purposes and coexist on many products.

