The barcode on a cereal box or a phone charger sold in the US or Canada is almost always a UPC. Here is what its 12 digits mean, how the last digit is checked, and how to get UPC codes for your own products.
What is a UPC code?
A UPC (Universal Product Code) is a 12-digit number that identifies one specific product: one brand, one item, one size or flavour. Its official name is GTIN-12. The bars printed above it are the UPC-A barcode, which lets a checkout scanner read the number in a fraction of a second.
A UPC doesn't contain a price, and it doesn't identify a single unit. Every box of the same product carries the same UPC, and the store's own system links that number to the price. The first UPC was scanned on 26 June 1974 at a Marsh supermarket in Troy, Ohio, on a pack of Wrigley's chewing gum.
What the 12 digits mean
- Company prefix (from GS1)
- Item number (you choose)
- Check digit
- Company prefix. Usually the first 6 to 10 digits, licensed to a company by GS1. A company that needs many numbers gets a shorter prefix, which leaves more digits for items.
- Item number. The digits after the prefix, which the company assigns, one for each product and variant.
- Check digit. The last digit, calculated from the other 11 so a scanner can catch a misread.
The first digit means something special in a few ranges: 2 is for items weighed and priced in the shop, such as meat and cheese; 3 is for medicines (US drug codes); 4 is for a shop's own internal use; and 5 is for coupons.
The check digit
Take the 11 digits before the check digit. Add the digits in the odd positions (1st, 3rd, 5th and so on) and multiply by 3. Then add the digits in the even positions. The check digit is what you need to reach the next multiple of 10.
0 + 2 + 4 + 6 + 8 + 0 = 20, × 3 = 60 · 1 + 3 + 5 + 7 + 9 = 25 · 60 + 25 = 85 → 90 − 85 = 5
So 0 12345 67890 gets the check digit 5. The UPC-A barcode generator does this for you: type 11 digits and the 12th is added, with the working shown step by step.
The UPC on a box and on a shipping carton
The UPC on a retail box identifies the item a shopper buys. A shipping carton that holds, say, 12 of those boxes needs a number of its own. Otherwise a warehouse that scans the carton would count one box instead of twelve. Cartons usually carry a 14-digit GTIN-14, often printed as an ITF-14 barcode. Our generator doesn't make ITF-14 barcodes.
Looking up the UPC on a box
To find out which product or company a UPC belongs to, type all 12 digits into a search engine or a barcode lookup site. GS1's own service, Verified by GS1, shows the company that licensed the number.
UPC vs SKU vs EAN
| UPC | EAN-13 | SKU | |
|---|---|---|---|
| Digits | 12 | 13 | Any letters and numbers |
| Issued by | GS1 US, GS1 Canada | The GS1 office in each country | You |
| Used | Shops in the US and Canada | Shops almost everywhere else | Inside your own business |
| Barcode to print | UPC-A | EAN-13 | Usually Code 128 |
GTIN is the family name for these product numbers: GTIN-12 is the UPC, GTIN-13 the EAN-13, GTIN-8 the EAN-8 and GTIN-14 the number on shipping cartons. A UPC is an EAN-13 with a leading zero, so scanners worldwide read both. A SKU is your own stock code: it can be anything you like, it never needs registering, and the Code 128 generator turns it into a barcode.
How to get a UPC code for your product
- Count your products and variantsEvery size, colour and flavour that is sold separately needs its own UPC.
- License numbers from GS1In the US, GS1 US offers single numbers for a few products and company prefixes for many. Outside the US, go to your country's GS1 office, such as GS1 UK or GS1 Pakistan; they usually issue 13-digit EAN numbers. Fees vary, so check their current prices.
- Assign and record each numberGive each product its number and enter its details in GS1's database, so retailers and marketplaces can match it to your brand.
- Make the barcode imageDraw the UPC-A or EAN-13 with a generator and print it at 80% to 200% of the standard size: 37.29 mm wide, margins included, at 100%.
- Test a printScan the printed barcode on the real packaging before the full run.
What about cheap UPCs from resellers? Resellers sell numbers from prefixes that GS1 originally licensed to other companies, and GS1 says its licences can't be resold. Marketplaces such as Amazon generally check numbers against GS1's records, so a resold number may show up under someone else's company and be rejected.
Can I make up my own UPC?
Not for products you sell through shops or marketplaces: the number must be licensed to you. Inside your own business you have two free options. Numbers starting with 2 or 4 are set aside for in-store use and are only valid in your own shop. Or skip UPC entirely and label your stock with your own SKUs as Code 128 barcodes, which any scanner reads.
Sources: GS1 US, "Guide to UPCs"; GS1 General Specifications (GTIN structure, prefixes and ITF-14 for trade items) and GS1's prefix list; GS1 US's history of the barcode for the first scan. Print sizes are worked out from GS1's 0.330 mm bar width at 100%.