What Is a UPC Code? The 12 Digits Explained
A UPC (Universal Product Code) is the 12-digit number printed beneath the black bars on most products sold in the United States and Canada. It gives each product a unique ID so any store's scanner can identify it in a fraction of a second. The code itself holds no price or name, only the number; the store's system looks up the rest.
The 12 digits
A standard UPC-A has 12 numeric digits in three parts:
| Part | Digits | Meaning |
|---|---|---|
| Number system | 1 | 0, 1, 6, 7 and 8 are used for ordinary products. 2 is for variable-weight items like meat and produce, 3 for drugs, 4 for in-store use, 5 for coupons. |
| Company prefix and item number | 10 | The brand owner's prefix, assigned by GS1, followed by the number the brand gives to this specific product. The split between the two varies by company. |
| Check digit | 1 | Calculated from the other 11 digits so a scanner can catch a misread or a typo. |
The company prefix and item number share ten digits. A company with a short prefix has more room for products; a company with a long prefix has less. GS1 sells prefixes of different lengths for this reason.
UPC code format
A UPC-A is numeric only: 12 digits, no letters and no spaces. On a package the digits are printed under the bars in a fixed layout: the number system digit on the left, outside the bars, then two groups of five digits, then the check digit on the right, outside the bars. The bars themselves are 95 modules wide, with guard bars at each end and in the middle that tell a scanner where the code starts, splits and stops. Leave a blank margin of at least nine modules on the left and right, the quiet zone, so the scanner can find the edges.
Where is the UPC on a product?
Look for the black bars with a 12-digit number beneath them, usually on the back or the bottom of the package, or on a tag or sticker for clothing and loose goods. The number under the bars is the UPC. A product can also carry other numbers, such as a batch code, a model number or a SKU, but only the one printed under the barcode is the UPC. If a package shows a 13-digit number instead, it is an EAN-13; see UPC vs EAN. If you have a photo of the barcode and can't read the digits, the barcode scanner will read the number for you from the picture.
UPC numbers and where they come from
UPC numbers, also called UPC code numbers or product code numbers, are not made up by each seller. A brand buys a company prefix from GS1, and then gives each product a number within that prefix. That keeps every UPC unique worldwide. You can check that a UPC is well-formed by recalculating its last digit, but only GS1's records show who owns it. To get your own numbers, see how to get a UPC code.
What a UPC does
Every product variant needs its own UPC. A shirt in blue medium and the same shirt in blue large are two products with two numbers. A six-pack of a drink is a different product from the single can. That precision is what lets retailers track stock, run promotions and reorder exactly what sold.
When a cashier scans a UPC, the register sends the number to the store's database. The database returns the description and price. Change the price in the database and the same barcode rings up the new amount, so nothing printed on the package has to change.
Who uses UPCs
- Retailers scan them at checkout and in receiving and inventory systems.
- Brands and manufacturers print them on packaging so stores will accept the product.
- Online marketplaces such as Amazon, Walmart and Google Shopping ask for them to match listings to a catalog entry.
- Distributors and warehouses use them to receive and pick stock.
UPC vs SKU
A SKU (stock keeping unit) is a code you invent for your own internal use, such as MUG-WHT-12. You choose the format, and no one outside your business needs to understand it. A UPC is a public number issued through GS1 and unique worldwide. Most businesses use both: the SKU for their own warehouse and spreadsheets, the UPC for anything that crosses a company boundary. Changing your SKU system never changes the UPC.
UPC-A and UPC-E
UPC-A is the full 12-digit version. UPC-E is a compressed 6-digit form for small packages like candy or lip balm, where a full-width barcode will not fit. A UPC-E can be expanded back into its 12-digit UPC-A equivalent, so it identifies the same product. Outside of very small packaging, UPC-A is what you want.
UPC is also closely related to the 13-digit EAN used in the rest of the world. A UPC-A is effectively an EAN-13 with a leading zero, which is why modern scanners read both without any trouble.
Make a UPC barcode
If you already have a 12-digit UPC, the UPC barcode generator turns it into a scannable image you can download as PNG or SVG. Enter 11 digits and it calculates the check digit for you; enter all 12 and it checks that the last digit is correct. Barcode Ready draws everything in your browser, so the numbers you type are never uploaded.
If you need to print the same code at different sizes, SVG stays sharp at any scale. For many products at once, use the bulk barcode generator.
Quick checklist
- A UPC is exactly 12 digits, with no letters.
- One UPC per product variant.
- The last digit must be a valid check digit.
- Buy your numbers from GS1, not from random resellers, if you plan to sell through retailers.
- Test the printed barcode with a real scanner or a phone before printing a full run.