How to generate a UPC-A barcode
- Enter the 11 data digits, including any leading zero, or enter an existing 12-digit UPC-A.
- Select Generate barcode. Eleven digits receive a calculated check digit; twelve digits are rejected if their check digit is wrong.
- Confirm the complete number and preview, then download SVG for scalable artwork or PNG for common documents.
UPC-A check digit and encoding
The check digit is calculated from the first 11 digits. Starting at the left, digits in odd positions are multiplied by three, digits in even positions are added once, and the final digit makes the total a multiple of ten.
For example, 03600029145 receives check digit 2, producing 036000291452. The barcode contains a start guard, six left digits, a centre guard, six right digits and an end guard: 95 encoded modules in total.
Quiet zones, module width and printing
A barcode needs blank space around the bars. This output includes 10 white modules on each side, exceeding the nine-module minimum used by the referenced UPC-A specification. Do not crop or place text, borders or artwork in those zones.
The SVG uses one unit per module and scales cleanly. The PNG uses three pixels per module. Scaling must be uniform: do not stretch only the width or height. Print with dark bars on a light background and avoid low-resolution resampling.
What this generator does not provide
The tool draws UPC-A from digits you supply. It does not issue a GTIN, register a product, verify ownership, connect to GS1, create random product numbers or guarantee that a retailer will accept the code.
It does not generate UPC-E, EAN, Code 128, QR codes, add-on symbols or bulk label sheets. Use the correct identification and registration process before placing a barcode on a product.
Verification and practical use
Generation verifies the check digit, the 95-module structure and the encoded digits before showing downloads. Automated browser tests also read the bars back from the produced PNG pattern.
A mathematically valid image can still scan poorly after printing because of size, ink spread, contrast, packaging curvature or damage. Test the final material with the actual scanner; this page does not claim a physical scan test.
Example workflow
Suppose your authorised 11-digit value is 04210000526. The calculated check digit is 4, so the full UPC-A is 042100005264. Download SVG for a layout application or PNG for a document, keep the quiet zones clear, and print a test at the intended size.
If you enter 042100005265, the tool stops instead of silently replacing the incorrect final digit. This makes validation different from check-digit calculation.
Frequently asked questions
Can this create a UPC number for my product?
No. It only encodes digits you provide. Number allocation and product registration are separate.
Why are leading zeroes important?
UPC-A always represents 12 digits. Removing a leading zero changes the data and check digit.
Is SVG or PNG better?
SVG is preferable for scaling in layouts; PNG is convenient at its fixed pixel size. Test either after final placement.
Does a valid check digit guarantee retail acceptance?
No. It confirms arithmetic only, not assignment, ownership, registration, print quality or retailer rules.