If you've ever bought a product in the United States or Canada, you've scanned a UPC code, also known as a UPC-A barcode. It's the standard barcode format for retail products across North America and one of the most widely used barcode types in the world.
In this guide, you'll learn what a UPC code is, how it's structured, how the check digit works, and how to generate one online for free.
A UPC code (Universal Product Code) is a 12-digit numeric barcode used to identify retail products, primarily in the United States and Canada. The most common version is UPC-A, which is the standard 12-digit format you see on nearly every product at a grocery store, pharmacy, or retail shelf.
UPC codes are part of the global GS1 barcode standard, the same system that manages EAN-13, ITF-14, and other retail barcode formats.
Example:
036000291452
This number is encoded into a scannable barcode that point-of-sale systems use to instantly look up product and pricing information.
A UPC-A barcode is the standard 12-digit UPC format used to identify retail products at checkout. It's the barcode format most North American retailers and POS systems are built around.
A UPC-A barcode is divided into 3 parts:
Example Breakdown:
036000 | 29145 | 2
The last digit of every UPC-A barcode is a check digit - calculated automatically from the first 11 digits using the GS1 Mod-10 algorithm. It lets scanners instantly detect if a barcode was entered or printed incorrectly.
UPC-A uses the exact same Mod-10 algorithm as EAN-13. In fact, a UPC-A code is simply an EAN-13 with a leading zero — when you add that leading zero, the UPC-A digits shift into EAN-13's positions 2 through 12, which is why the weighting pattern for UPC-A's own 11 digits is odd positions (1, 3, 5, 7, 9, 11) × 3 and even positions (2, 4, 6, 8, 10) × 1. For the full step-by-step formula, worked examples, and JavaScript/Python code, see our EAN-13 check digit guide — the underlying Mod-10 logic is identical for both formats.
You can calculate or validate a UPC-A check digit instantly using our Barcode Check Digit Calculator, which supports EAN-13, UPC-A, EAN-8, and ITF-14.
You can generate a valid UPC-A barcode using a free online tool in just a few steps.
Generate a valid UPC-A barcode instantly for free. No signup required.
Generate UPC-A Barcode Now →Need to generate many UPC barcodes at once? Use our Bulk Barcode Generator to create up to 500 barcodes from a list, or the Random Barcode Generator to create sample UPC-A numbers for testing.
💡 A UPC-A code can always be converted into EAN-13 by adding a leading zero. 👉 Want a detailed comparison? See EAN vs UPC differences.
It's important to understand the difference between generating a UPC barcode image and owning a registered UPC number.
Our UPC-A Barcode Generator creates a scannable, structurally valid barcode image from any 11 or 12-digit number you enter — complete with a correct check digit. This is useful for:
However, a barcode that is structurally valid is not the same as a UPC that is globally unique and registered. To sell products through major retailers or marketplaces, you typically need a UPC number from a GS1-registered company prefix — this guarantees no other company in the world uses the same number.
In most cases, yes. Amazon requires GS1-registered UPC or EAN codes for the majority of product categories and cross-checks submitted barcodes against the GS1 database. Using a randomly generated or unregistered UPC for a live Amazon listing can result in listing suppression. If you're testing your listing workflow or building a prototype, a generated UPC is fine — for an actual live listing, register through your national GS1 organization.
Number: 036000291452
Format: Standard retail barcode (North America)
Usage: Product identification at point-of-sale
The UPC code (or UPC-A barcode) is the backbone of retail product identification across North America. Understanding its structure, check digit, and how it relates to EAN-13 helps you manage products correctly and avoid common barcode mistakes.
If you need to create one quickly, try our free UPC-A Barcode Generator and start generating barcodes instantly.
You can also analyze existing barcodes or generate random barcode numbers for testing and validation purposes.
Need a different barcode format? We also offer generators for EAN-13 (global retail), Code 128 (logistics and shipping labels), Code 39 (asset tracking), and ITF-14 (shipping cartons and outer packaging).