UPC-A Barcode Generator
This UPC barcode generator makes the twelve-digit code found on almost every retail product sold in the United States and Canada. Enter eleven digits and the check digit is calculated for you, or enter twelve and it gets verified rather than silently accepted.
On this page
Build your UPC-A code
Size, colour and export options
Never set this to zero. A cropped quiet zone is the most common reason a printed barcode will not scan.
Preview
What was checked
Verify any code by test scanning a printed sample before a production run. Provided as is, and used at your own risk. See the terms.
What UPC-A is
UPC-A, the Universal Product Code, was the first barcode symbology adopted at retail scale and it still runs North American checkout. It encodes exactly twelve numeric digits and nothing else, no letters and no punctuation.
The twelve digits are not arbitrary. The first identifies the numbering system, the next block identifies the company, the next identifies the product, and the last is a modulo 10 check digit computed from the eleven before it. That check digit is what lets a scanner reject a misread rather than return the wrong product.
Internationally the equivalent is EAN-13, which is a UPC-A with an extra leading digit. Modern scanners read both, which is why a product with either symbol usually works on either continent.
UPC-A specification
| Character set | Digits 0 to 9 only |
|---|---|
| Length | Exactly 12 digits, including the check digit |
| Check digit | Modulo 10, required |
| X-dimension | 0.264mm minimum, 0.330mm recommended, 0.660mm maximum |
| Symbol height | 18.28mm minimum, 22.85mm recommended, 45.70mm maximum |
| Quiet zone | At least 9 times the X-dimension on both sides |
| Governed by | GS1 |
The most expensive mistake in barcoding
This tool draws a valid UPC-A image from whatever twelve digits you give it. It cannot register those digits to you. Retailers and marketplaces check the number against the GS1 registry and expect it to resolve to your company, and an invented number either fails that check or collides with a real product.
If the code is only ever scanned inside your own business, none of that applies and you can use any number you like. If it crosses a retail till, you need a registered GTIN first. What that actually involves.
Sources
Every specification figure on this page traces to one of the following. Nothing is stated here that could not be checked against them.
- GS1 General Specifications size limits, as published by GS1
- GS1 General Specifications, UPC-A structure and modulo 10 check digit
- bwip-js, MIT-licensed barcode encoder implementing the ISO/IEC symbologies
Last reviewed 6 September 2026
This page is maintained by Cedrick Reese at Ready Utilities. The UPC-A structure and check digit rule come from the GS1 General Specifications, which govern the symbology, and encoding is performed by the MIT-licensed bwip-js library at a pinned version so output cannot change without review. The X-dimension, height and quiet zone figures reproduce the size limits published by GS1, and are rechecked against the current published specification whenever this page is updated, since GS1 revises it annually.
Common questions
How many digits is a UPC?
A UPC-A is exactly 12 digits, and the twelfth is a check digit calculated from the first eleven. If you have 11 digits, this generator adds the twelfth for you.
What is the difference between UPC-A and UPC-E?
UPC-E is a compressed form that suppresses zeros to fit 8 digits into a smaller symbol, for packages too small to carry a full UPC-A. It still represents a 12-digit number underneath.
Can I make my own UPC number?
For internal use, yes, any 12 digits will scan. For retail sale, no. The number has to be a GTIN registered to your company through GS1, because that is what retailers verify.
What is the check digit and why does it matter?
It is a single digit computed from the other eleven using a modulo 10 weighting. Scanners recompute it on every read, so a misread fails instead of returning a wrong product. Getting it wrong means the barcode either will not scan or scans as the wrong item.