Home › Generators & Text Tools › UPC Barcode Generator
UPC Barcode Generator
The UPC Barcode Generator turns your product number into a real, scannable UPC-A barcode. Type 11 digits and the tool works out the check digit for you, or type all 12 digits and it checks the last one — then it draws the barcode with the true UPC-A bar patterns, ready to download as a PNG and print.
Enter 11 digits to have the check digit calculated, or 12 digits to have it validated. Spaces and hyphens are ignored.
How it works
A UPC-A barcode is the black-and-white striped label on almost every product sold in a store in North America. It encodes 12 digits. The first digit is the number system digit — 0 for most regular products. The next five digits identify the manufacturer, the five after that identify the specific product, and the twelfth digit is the check digit, which exists to catch typing mistakes. A scanner reads the bars, turns them back into the 12 digits, and the store's system looks up the price for that product.
The barcode itself is built from 95 modules, where one module is the narrowest bar or gap. It starts with a left guard pattern of bar-space-bar (101), then the six left-hand digits, a middle guard (01010), the six right-hand digits, and a right guard (101). Each digit is 7 modules wide. Left-hand digits use the L encoding patterns and right-hand digits use the R patterns — the same tables used for EAN-13 barcodes, which is why the two symbologies look alike. The guard bars run the full height of the barcode while the digit bars stop slightly short, which is how a scanner finds the edges and the middle of the code.
The check digit is calculated from the first 11 digits. Add the digits in the odd positions — the 1st, 3rd, 5th, 7th, 9th, and 11th — and multiply that total by 3. Add the digits in the even positions — the 2nd, 4th, 6th, 8th, and 10th. Add the two totals together. The check digit is the number that brings the grand total up to the next multiple of 10, or 0 if the total is already a multiple of 10. If you type 12 digits and the last one does not match the calculated check digit, the tool tells you what it expected and refuses to draw the barcode, because a barcode for a mistyped number would scan as the wrong product.
The height and bar-width controls change the size of the drawn barcode without changing the pattern, and the PNG download saves the exact canvas you see, with a white quiet zone on each side so scanners can find the edges. Print it at a size where the narrowest bar is at least 0.33 mm wide, keep the quiet zones clear of text and borders, and always test the printed barcode with a real scanner before a full print run. The tool never uploads your numbers — everything is drawn in your browser.
Worked example
A small maker sells jars of jam and has been given the 11-digit base number 03600029145. She needs the full UPC-A barcode for the label.
Step 1: Type 03600029145 in the digits field and press Generate Barcode.
Step 2: The tool adds the odd-position digits: 0 + 6 + 0 + 2 + 1 + 5 = 14, and multiplies by 3 to get 42. It adds the even-position digits: 3 + 0 + 0 + 9 + 4 = 16. The grand total is 42 + 16 = 58.
Step 3: The next multiple of 10 above 58 is 60, so the check digit is 60 − 58 = 2. The full UPC-A is 036000291452.
Step 4: The barcode is drawn: 95 modules, starting with the guard pattern 101, with the first left digit (0) using its L pattern 0001101, and the digits 036000291452 printed underneath.
The tool shows exactly this result: the headline reads Valid UPC-A — barcode ready, the table shows an odd-position total of 42, an even-position total of 16, and an expected check digit of 2, and the download is a 345 × 120 PNG at the standard scale (95 modules × 3 pixels wide, plus quiet zones). If you type the full 12 digits 036000291452 instead, the tool checks the final 2 against the same calculation and draws the same barcode.
FAQ
What is a UPC-A barcode?
UPC-A is the barcode printed on most retail products in North America. It encodes 12 digits: a number system digit, five manufacturer digits, five product digits, and a final check digit. A scanner reads the pattern of bars and spaces and turns it back into those 12 digits.
What if I only have 11 digits?
Enter the 11 digits and the tool works out the 12th digit — the check digit — for you. The check digit is calculated from the other 11 digits, so you do not need to guess it. Type the full 12 digits instead if you already have them, and the tool will check that the last digit is correct.
How is the UPC check digit calculated?
Add the digits in the odd positions (1st, 3rd, 5th, and so on) and multiply that total by 3. Add the digits in the even positions. Add the two totals together, and the check digit is the number that brings the grand total up to the next multiple of 10 — or 0 if it is already a multiple of 10.
Will this barcode scan?
Yes, if it is printed clearly at a sensible size. The bars are drawn from the official UPC-A encoding tables, with the correct guard bars, quiet zones, and digit patterns, so a scanner reads back exactly the 12 digits you entered. Always test the printed barcode with a real scanner before a full print run.
What is the difference between UPC-A and EAN-13?
UPC-A has 12 digits and is the standard retail barcode in North America, while EAN-13 has 13 digits and is used in most of the rest of the world. The two use the same bar patterns for the digits they share, but a UPC-A number cannot be used as an EAN-13 number — the extra digit and the check digit calculation differ. Use our ISBN barcode generator for EAN-13 book barcodes.