UPC Generator
This UPC generator builds a 12-digit UPC-A code by adding the GS1 check digit to 11 digits, or checks a full code you paste.
How to use
- Enter 11 digits to calculate the 12th check digit.
- Or paste a 12-digit UPC to see whether the check digit matches.
- Use the result for tests and mockups. Retail shelf codes need a licensed GS1 prefix.
Formula
From the left, odd positions (1, 3, 5, …) are multiplied by 3 and even positions by 1. Add those products. The check digit is the amount needed to reach the next multiple of 10.
Example. The 11 digits 03600029145 produce check digit 2, so the UPC-A is 036000291452.
Frequently asked questions
What is a UPC check digit?
The 12th digit computed from the first 11 so scanners can catch typos.
Can I use a random UPC in stores?
No. Real retail UPCs need a GS1 company prefix you license. This tool is for demos and tests.
UPC-A vs EAN-13?
UPC-A is 12 digits (common in the US). EAN-13 is 13 digits and is common internationally.
Does this draw a barcode image?
It produces the digit string and can render a simple barcode graphic for screenshots.
Related to your barcode tool?
Yes. Pair this with the barcode generator when you need other symbologies.
Related tools
- DevBarcode GeneratorEncode a SKU or number as Code 128, Code 39, EAN-13, or UPC-A and download PNG or SVG.
- DevJSON Formatterin-browser JSON pretty-printer, minifier, and syntax validator.
- DevRegex TesterTest JavaScript regular expressions with live match highlighting.
- DevSubnet CalculatorCIDR to netmask, hosts, network, and broadcast for IPv4.
- DevXML FormatterPaste XML to pretty-print, validate, and minify it in the browser.
- DevSQL FormatterBeautify messy SQL queries with clean indentation and uppercase keywords.