Barcodes UPC-A Runs in your browser

UPC-A Barcode Generator

Generate and validate 12-digit UPC-A retail barcodes.

Your data is processed locally in your browser and is not uploaded to our servers.

What is a UPC-A barcode?

UPC-A is the 12-digit barcode used on retail products across North America. It encodes a manufacturer code and product number, with a final check digit that guards against scan errors.

How to create one

Enter 11 digits and we calculate the 12th check digit automatically, or enter a full 12-digit code and we verify it. The tool blocks non-numeric input and shows the check-digit math so you can see exactly how the final number is formed.

How the check digit works

UPC-A uses a modulo-10 checksum: digits in odd positions are weighted by 3 and even positions by 1, the weighted sum is taken, and the check digit is whatever makes the total a multiple of 10. Our results panel shows the entered digits, the calculated check digit and the full number.

Generating vs registering

This tool produces a correct, scannable barcode image. It does not assign or register an official product number. Genuine retail UPCs are issued by GS1; to sell through major retailers you need a number allocated to your company.

Scanning and printing tips

Print UPCs in black on white at their standard size, keep the light margins on each side, and avoid stretching. Test with a real scanner before committing to a print run.

Limitations

A generated image is not a substitute for an official GS1 number. Resizing too small or recoloring can make the barcode unreadable.

What each digit means

A UPC-A is exactly 12 digits, and the structure matters if you are checking a number rather than inventing one.

PositionPartMeaning
1Number system0, 6, 7, 8 general retail · 2 variable-weight items priced in store · 3 pharmaceutical (NDC) · 4 retailer internal use · 5, 9 coupons
2–6Company prefixAssigned to a brand owner by GS1. This is the part you cannot make up.
7–11Item referenceChosen by the brand owner — one per product and per variant.
12Check digitCalculated from the first 11. Not chosen.

The company-prefix and item-reference split is not fixed at 5 and 5; a longer prefix means fewer item digits. Number system 2 is worth knowing about because those codes are generated by a store's scale, and the "item reference" carries a price — which is why a deli label from one supermarket is meaningless in another.

The check digit, calculated by hand

The check digit exists to catch mistyped and misread numbers. It will not tell you whether a number is yours — only whether it is internally consistent.

Take 03600029145, the first 11 digits of the first product ever scanned at a checkout (a 10-pack of Wrigley's Juicy Fruit, 1974).

  1. Working from the right of the 11 digits, multiply alternately by 3 and 1:
    5×3=15, 4×1=4, 1×3=3, 9×1=9, 2×3=6, 0×1=0, 0×3=0, 0×1=0, 6×3=18, 3×1=3, 0×3=0
  2. Add them: 15+4+3+9+6+0+0+0+18+3+0 = 58
  3. Subtract from the next multiple of ten: 60 − 58 = 2

The full number is 036000291452. If the sum had ended in 0, the check digit would be 0, not 10.

Try changing one digit and re-entering it here: 036000291455 is rejected, and the tool tells you the correct digit is 2. That single-digit sensitivity is the whole point of the checksum. It does not catch every error — transposing two adjacent digits that differ by 5 slips through — which is why scanners also verify bar patterns and parity.

A generated image is not a registered number

This is the most consequential thing on the page. This tool draws a correctly formatted, scannable barcode from a number you supply. It does not, and cannot, assign that number to you.

GTINs are issued by GS1. A retailer's system looks the number up in a database that maps it to a brand owner and a product. Printing a well-formed number that belongs to somebody else produces a barcode that scans perfectly and rings up as the wrong item.

  • Selling through retail: you need a GS1 company prefix. There is no legitimate shortcut.
  • Resold or "one-off" UPCs from a third party are typically old prefixes whose registration does not point at you. Many retailers now verify against GS1 and reject them.
  • Internal use only — your own stockroom, your own scanner, nothing leaving the building: use number system 4, or better, use Code 128, which is designed for exactly this and does not consume a retail number space.
  • Amazon and other marketplaces generally require a GTIN that resolves to you in GS1's database.

See the disclaimer and the GS1 basics guide.

UPC-A or EAN-13?

They are the same symbology. A UPC-A is an EAN-13 with a leading zero: 036000291452 and 0036000291452 encode the same product, and every retail scanner made in decades reads both.

SituationUse
Selling in the US or CanadaUPC-A — expected on packaging, and narrower on a crowded label
Selling in Europe, Asia, Australia, elsewhereEAN-13
Selling in bothEither. One symbol is enough; do not print two
Package too small for a full-size symbolUPC-E, which compresses certain UPC-A numbers to 8 digits
Shipping cartons of the itemITF-14, built from the same GTIN

Frequently asked questions

Does this register an official UPC?

No. It creates a valid, scannable barcode image. Official retail UPC numbers are issued by GS1 to your company.

What if I only have 11 digits?

Enter 11 digits and the tool calculates and appends the correct 12th check digit for you.

Why was my 12-digit code rejected?

The check digit did not match. The tool shows the correct check digit so you can fix it.

Can I use a UPC I generate here to sell in a shop?

Only if the number is already yours. This tool draws a correct barcode from a number you supply; it cannot assign one. Retail GTINs come from GS1, and a well-formed number belonging to somebody else scans perfectly and rings up as their product.

What is the check digit for?

It catches mistyped and misread numbers. It is calculated from the first 11 digits, so it can only tell you a number is internally consistent — never that it is registered to you.

My number is 11 digits. Is it wrong?

No — that is the payload. Enter it and the twelfth digit is calculated with the working shown. If you have 12 digits, the last one is verified instead.

Should I use UPC-A or EAN-13?

UPC-A for the US and Canada, EAN-13 elsewhere. They are the same symbology — a UPC-A is an EAN-13 with a leading zero — and modern retail scanners read both, so one symbol is enough even if you sell in both markets.

Curious how we build and check these codes? Read our methodology, and the disclaimer on what a generated barcode image is and is not.