UPC Barcode Generator (UPC-A and UPC-E)
Draw UPC-A or UPC-E barcodes with the check digit added or verified, UPC-E ↔ UPC-A conversion and optional EAN-2/EAN-5 add-on. PNG or SVG.
UPC-A is the 12-digit barcode on almost every product sold in the United States and Canada; UPC-E is its 8-digit, zero-suppressed form for small packs such as drink cans. This generator adds or checks the check digit, converts between UPC-E and UPC-A in both directions, can append an EAN-2 or EAN-5 add-on, and draws the barcode as a PNG or SVG in your browser. Retail UPC numbers must be licensed from GS1 — the tool only draws numbers you already have.
How to use this tool
- Choose UPC-A or UPC-E.
- Type the number: 11 digits for UPC-A (the check digit is added) or 12 to verify it; for UPC-E, 6, 7 or 8 digits, or a UPC-A to compress.
- Add an optional 2- or 5-digit add-on, and set the bar width, height and digits.
- Download the PNG for quick use or the SVG for print layouts.
Formula
Check digit = (10 − (3 × sum of odd positions + sum of even positions) mod 10) mod 10
Positions are counted from the left of the 11-digit UPC-A body. UPC-E keeps the number system, six digits and the UPC-A check digit; the last of the six says where the zeros go: 0–2 → XX d 0000 NNN, 3 → XXX 00000 NN, 4 → XXXX 00000 N, 5–9 → XXXXX 0000 d.
Example
For 03600029145: odd positions 0+6+0+2+1+5 = 14, × 3 = 42; even positions 3+0+0+9+4 = 16; 42 + 16 = 58, so the check digit is 2 and the full code is 036000291452. It has no UPC-E form. UPC-E 04252614 ends its six digits with 1, so it expands to manufacturer 42100 and product 00526 — UPC-A 042100005264.
Frequently asked questions
Can I make up my own UPC number?
Not for retail. Shops and marketplaces check that the company prefix is licensed from GS1. Numbers starting with 2 or 4 are for in-store use only.
What size should I print it?
At 100% a UPC-A is about 37.3 mm wide with the narrowest bar 0.33 mm; GS1 allows 80% to 200%. Do not squash the height or crop the white margins.
Why can only some numbers become UPC-E?
UPC-E drops a run of zeros, so the manufacturer and product codes must contain zeros in the places the six rules allow, and the number system must be 0 or 1.
Sources
Last updated: 2026-10-30