UPC Barcode Generator
Generate a scannable UPC-A barcode online. Enter 11 digits and the tool adds the correct check digit, then draws a downloadable 12-digit barcode as an SVG image.
Updated 2026-06-14 · Free · No sign-up · Runs privately in your browser
Enter the first 11 digits and the check digit is added automatically, or paste a full 12-digit code to verify it.
Show the formula & steps
How the UPC Barcode Generator Works
This tool turns a UPC number into a scannable UPC-A barcode. Enter the first 11 digits and it calculates the required check digit, encodes all 12 digits using the standard module patterns, and draws the barcode as a crisp SVG image you can save.
The Formula
The 12th digit of a UPC-A code is a check digit that guards against scanning errors. It is computed from the first 11 digits:
sum = 3 × (sum of odd-position digits) + (sum of even-position digits) check digit = (10 − (sum mod 10)) mod 10
Positions are counted from the left starting at 1, so positions 1, 3, 5, 7, 9 and 11 are the odd positions.
Worked Example
For the first 11 digits 0 3 6 0 0 0 2 9 1 4 5:
- Odd-position digits (1,3,5,7,9,11) = 0, 6, 0, 2, 1, 5 → sum 14, × 3 = 42
- Even-position digits (2,4,6,8,10) = 3, 0, 0, 9, 4 → sum 16
- Total = 42 + 16 = 58; 58 mod 10 = 8
- Check digit = (10 − 8) mod 10 = 2
The full UPC-A is 036000291452.
How UPC-A Is Encoded
Every UPC-A barcode follows the same structure of bars and spaces:
left guard (101) · 6 left digits · center guard (01010) · 6 right digits · right guard (101)
Each digit is drawn with a fixed 7-module pattern; the left digits use the L-code and the right digits use the R-code, which is its mirror image.
Tips for Reliable Scanning
| Factor | Recommendation |
|---|---|
| Size | Keep close to the nominal 1.0 magnification; avoid shrinking |
| Quiet zone | Leave clear white space at both ends |
| Contrast | Black bars on a white background scan best |
| Use a sharp printer; blurry bars fail to scan |
Frequently asked questions
How do I generate a UPC barcode?+
Enter the first 11 digits of your UPC. The tool calculates the 12th check digit automatically, then encodes all 12 digits with the standard UPC-A pattern and draws a scannable barcode you can download.
How is the UPC check digit calculated?+
Add the digits in the odd positions (1st, 3rd, 5th, and so on) and multiply by 3, then add the even-position digits. Take that total mod 10, and the check digit is (10 − that remainder) mod 10. For 03600029145 the check digit is 2.
How many digits is a UPC-A barcode?+
A UPC-A barcode has exactly 12 numeric digits: a number-system digit, 10 data digits and one check digit. The product manufacturer code and item number make up the data digits, and the final digit verifies the rest.
Is this UPC barcode scannable?+
Yes. The tool uses the official UPC-A module patterns with the correct guard bars and check digit, so the rendered barcode follows the GS1 specification and scans on standard retail readers when printed at a clear, adequate size.
Can I use this barcode to sell products?+
You can render any UPC for testing or internal use, but to sell in retail you need a UPC number licensed from GS1 so it is globally unique. This tool draws the barcode; it does not assign you an official, registered UPC number.