How the UPC Code Works

By: Cherise Threewitt  | 
Woman encountering a UPC at the grocery store.
We scan UPC bar codes every day when we pay for items at automated self-service checkout terminals in supermarkets and other retail marketplaces. frantic00/Shutterstock

If you look in your refrigerator or pantry, you'll find that just about every package you see has a unique UPC code, or Universal Product Code. In fact, all items sold by major retailers, including grocery stores, department stores, and online retailers have Universal Product Codes.

But where do these UPC codes come from, and what do their numerical digits mean? In this article, we'll discuss the UPC code and how it works.


What Is a UPC Code and a Bar Code?

It's first helpful to start out defining the UPC barcode. A bar code is made up of bars and spaces of varying width found on packages of products sold everywhere. Bar codes are read by optical bar code scanners at stores. The most common bar code is the UPC code (aka UPC-A).

UPC barcodes were originally created in the early 1970s to identify products and help grocery stores speed up the checkout process and keep better track of inventory, but the UPC code system caught on quickly in other retail areas because it was so successful. The first UPC code appeared on a pack of Wrigley's gum sold in in Troy, Ohio, in June 1974.


UPC codes are most commonly used for retailers in the United States, while the European Article Number code or EAN code is used internationally. Today, though, most places will accept both UPC codes and EAN codes.

What is a Global Trade Item Number?

A UPC code is a bar code symbol with a 12-digit number called a GTIN-12. GTIN stands for Global Trade Item Number or Global Trade Identification Number. It is the UPC data derived from the Uniform Code Council (UCC), a nonprofit organization that represents the market for supply chain codes.

The GTIN-12 number is the UPC data that comes from a UPC Company Prefix and Item Reference Numbers (more on that below). The most common type for retail stores is the UPC-A, which is for products sold at a retail point of sale. Today all retail products have their own unique UPC code, which is used for inventory management and ease of sales.


How Bar Codes Work

A bunch of unique bar codes.
Bar codes use patterns of squares, hexagons, dots and other shapes to encode data. pikepicture/Shutterstock

Bar codes are technical, but they're not that hard to understand when you break the process down in a few steps.

  1. Data: A bar code has tons of information about an individual product, including its weight, price, manufacture date, product ID and more. This data is generated by a bar code website (more on that below).
  2. UPC barcode symbols: This is the process of encoding that data into a bar code. The parallel lines of a bar code symbolize a language of letters and numbers.
  3. Data collection: Data stored on the bar codes can be scanned in a few ways, including using a bar code scanner at a grocery store, or a phone camera. The scanner picks up the code and all the data included and translates the code into text.


What Is a UPC Company Prefix?

One of the most important parts of the UPC code data is the UPC company prefix. Its sole purpose is to assign the company a unique company prefix for identification.

A UPC company prefix is a unique six to nine digit number assigned by GS1 US to a company. Companies with a large numbers of items and UPC needs get a UPC company prefix with fewer digits to allow for more product identification assignments.


Buying UPC Codes

The prefix, IRN, and check digit of a UPC code.
A UPC code includes the UPC company prefix, the item reference number and the check digit number. Companies purchase UPC codes for products they sell in retail stores and online. GS1US

UPC codes are not free. As we mentioned, GS1 US assigns them so it's best to register directly with the nonprofit. There are third-party resellers where companies can buy UPC codes in bulk, but it breaks the chain of authority, so it's best to register in the GS1 US database. Here's how do do that.

  1. Determine how many UPC codes you need. You need to purchase UPC codes for each individual product. For example, if you're selling a T-shirt that comes in three sizes (small, medium and large) and three colors (red, white and blue), you'll need nine UPC codes.
  2. Buy UPC codes. As we suggested, register with GS1 US for your UPC codes to ensure they work properly and to keep the chain of authority intact.
  3. Pay charges. The pricing plan you pay depends on the provider and the number of bar codes you need. For example, a small business might need just one UPC, while a large seller on Amazon Marketplace will require multiple Amazon UPC codes. Some UPC providers might charge an initial fee and then an annual renewal fee later.
  4. Get your UPC codes. Be sure to view your product's UPC before you download it. Once you know it has the correct information from the provider site, you can download it.


UPC Codes for Amazon

Amazon uses bar codes to identify and track inventory through the fulfillment process. That means sellers on the Amazon marketplace must have a product code on all items they are selling online.

But Amazon uses three kinds of bar codes for this purpose:


  1. Manufacturer code or manufacturer identification number, including Universal Product Codes
  2. Amazon bar codes
  3. Transparency authenticity codes (brand owner only)

Amazon uses the UPC to manage inventory. When more than one seller has inventory with the same UPC code, Amazon fills orders that are closest to the customer for faster delivery.

When products don't have UPC codes, they must have Amazon UPC codes. Sellers can print Amazon bar codes from their seller accounts and affix the bar codes to their packages.


UPC: A Barcode That's Sticking Around

UPC barcodes have revolutionized the retail and inventory management industries by providing a fast, reliable, and standardized method for tracking products worldwide. By encoding vital information about a product into a compact, machine-readable format, UPC codes streamline the checkout process, enhance inventory tracking, and facilitate the efficient distribution of goods.

As technology evolves, the underlying principle of UPC codes—improving accuracy and efficiency in product identification—continues to underpin newer systems, ensuring that UPC codes remain a foundational element of modern commerce for years to come.


This article was updated in conjunction with AI technology, then fact-checked and edited by a HowStuffWorks editor.

Frequently Answered Questions

What does UPC stand for?
UPC stands for Universal Product Code.