UPC Barcode Generator
Generate a scannable UPC-A barcode from an 11 or 12-digit number.
How to Use
Enter an 11-digit UPC number, the checksum digit is calculated and appended automatically, or paste in a full 12-digit number if you already have one with its check digit included. The barcode preview updates live as you type, ready to download as a PNG for packaging mockups, inventory labels, or documentation. The default example, 03600029145, generates a full code of 036000291452 once its check digit is calculated, worked through step by step below.
How the Check Digit Is Actually Calculated
UPC-A's check digit comes from a specific, publicly documented formula, not an arbitrary random digit. Starting from the 11-digit base 03600029145, take the digits in the odd positions (1st, 3rd, 5th, 7th, 9th, 11th: 0, 6, 0, 2, 1, 5) and add them together, giving 14, then multiply that sum by 3, giving 42. Next, take the digits in the even positions (2nd, 4th, 6th, 8th, 10th: 3, 0, 0, 9, 4) and add them together, giving 16. Add the two results together, 42 plus 16 equals 58. The check digit is whatever number, when added to 58, brings it up to the next multiple of 10, in this case 2, since 58 plus 2 equals 60. That makes the full, correctly checksummed code 036000291452, exactly what this tool generates and displays beneath the barcode's bars.
What Each Part of the Number Means
A UPC-A number isn't just a random 12-digit string, it's structured into meaningful sections. The first digit is a number system character, almost always 0 for standard retail products (other values are reserved for coupons, variable-weight items like fresh meat sold by weight, and a few other special categories). The next five digits identify the manufacturer specifically, a code officially licensed to one company by GS1, meaning no two companies should ever share the same manufacturer code. The following five digits are the product code, assigned internally by that manufacturer to distinguish between their own different products. The final digit, as shown above, is the check digit, existing purely for error detection rather than carrying any product information itself.
UPC-A vs EAN-13
UPC-A and EAN-13 are close siblings rather than unrelated formats. Every valid UPC-A code can be converted into an equivalent EAN-13 code just by placing a 0 in front of it, 036000291452 as a UPC-A becomes 0036000291452 as EAN-13, the exact same product identity, just formatted for the international standard. This is why EAN-13 scanners at most modern retail checkouts can read a UPC-A barcode without any special configuration, they're reading a shared underlying numbering scheme. The distinction mainly matters for which format is conventional where, UPC-A is the standard specifically in the United States and Canada, while EAN-13 is used almost everywhere else in the world including for many products that also circulate in North America.
Common Use Cases
Beyond generating a barcode for an already-registered retail product, this tool is useful for prototyping product packaging before a final GS1 number is assigned, testing how a barcode looks and scans on a mockup label, and regenerating a replacement label when an original barcode is damaged, faded, or misprinted and needs reprinting from the same known number. Small internal inventory systems sometimes also adopt UPC-A-style structured numbers purely for internal consistency, even without formal GS1 registration, since the fixed 12-digit format with a built-in check digit is a convenient, self-verifying way to catch data-entry typos.
Common Mistakes
Entering a 10-digit or 13-digit number expecting it to work is the most common input error, UPC-A strictly requires 11 or 12 digits, nothing else, an error message explains the mismatch rather than guessing at what you meant. Assuming any number that happens to pass the checksum calculation is safe to treat as a real, unique product identifier is a bigger mistake covered in the FAQ below, checksum validity only confirms the number wasn't mistyped, it says nothing about whether that number has actually been licensed to you specifically through GS1. Finally, forgetting that the checksum is recalculated from whatever digits you provide, not fixed to a specific product, means two completely different 11-digit bases can produce entirely different valid 12-digit codes, there's no shortcut for guessing a real product's check digit without also getting all 11 preceding digits exactly right.
Frequently Asked Questions
What is a UPC-A barcode?
UPC-A (Universal Product Code) is the standard 12-digit barcode used on retail products across North America. The first 11 digits identify the manufacturer and product, and the final digit is an automatically calculated checksum that lets scanners detect a misread.
Do I need to calculate the checksum digit myself?
No, enter just the first 11 digits and the checksum is calculated and appended automatically. If you already have a full 12-digit code including its checksum, that works too, as long as the checksum is correct.
What does each part of a UPC-A number actually mean?
Reading left to right, the first digit is the number system character, indicating the general category the code belongs to (0 or 1 for most regular retail products, other values for coupons, variable-weight items like meat and produce, and other special cases). The next five digits are the manufacturer code, officially assigned to a specific company by GS1. The following five digits are the product code, chosen by that manufacturer to identify a specific item in their own catalog. The final digit is the check digit, calculated from all 11 digits before it.
Is UPC-A the same as EAN-13?
They're closely related but not identical. EAN-13 is effectively a superset of UPC-A, any UPC-A code can be converted to a valid EAN-13 code simply by adding a 0 in front of it, and most EAN-13 scanners can read a UPC-A barcode without any special handling. The reverse isn't guaranteed, an EAN-13 code from outside North America that doesn't start with 0 has no direct UPC-A equivalent, which is part of why EAN-13 became the more universal international standard while UPC-A remains common specifically in North America.
Can I generate a barcode here for a real product I plan to sell?
This tool will happily generate a scannable, checksum-valid barcode from any 11 or 12-digit number you provide, but for a product actually sold in stores, the underlying number needs to be officially licensed through GS1 rather than picked arbitrarily. A self-chosen number that passes the checksum check is still just as likely to collide with someone else's real registered product once it reaches an actual retail scanning system, GS1 registration is what guarantees your number is globally unique.
Is my UPC number sent anywhere when I generate a barcode?
No. The barcode is rendered entirely in your browser using the open-source JsBarcode library loaded from a CDN, the number you enter is never transmitted to a server, it exists only in your browser tab and inside the downloaded image once you save it.