Free barcode generator for UPC, EAN-13 and Code 128
Type a product number or SKU, get the check digit worked out, and download a crisp SVG or PNG for labels. Runs entirely in your browser.
Runs in your browser. Nothing you enter or open is uploaded.
The short answer
Pick UPC-A for US and Canadian retail, EAN-13 for international products, or Code 128 for inventory labels with letters and numbers. Enter the digits and the tool adds the check digit and draws the bars. To sell through retailers or Amazon, the number itself must be licensed from GS1 US or GS1 Canada.
How it is calculated
UPC-A and EAN-13 check digit: from the rightmost digit, multiply digits alternately by 3 and 1, add them up, then check digit = (10 − (sum mod 10)) mod 10
Code 128: check = (start value + Σ symbol value × position) mod 103
Worked example
Work out the check digit for the UPC-A number 01234567890 (a common sample code, not a real product).
- Digits in odd positions from the right (weight 3): 0 + 2 + 4 + 6 + 8 + 0 = 20; × 3 = 60
- Digits in even positions (weight 1): 1 + 3 + 5 + 7 + 9 = 25
- Total: 60 + 25 = 85
- Check digit = (10 − 5) mod 10 = 5
The full UPC-A is 012345678905, which the tool fills in for you
Quick reference table
| Type | Number without check digit | Check digit | Full number |
|---|---|---|---|
| EAN-13 | 590123412345 | 7 | 5901234123457 |
| EAN-13 | 400638133393 | 1 | 4006381333931 |
| UPC-A | 01234567890 | 5 | 012345678905 |
| UPC-A | 03600029145 | 2 | 036000291452 |
| EAN-8 | 9638507 | 4 | 96385074 |
Special cases and common mistakes
- A made-up number scans, but it is not yours. Any 11 digits make a valid-looking UPC, yet it may already belong to another company. Retailers and marketplaces look up who owns the number, so retail barcodes need a GS1-licensed prefix or GTIN.
- Cheap resold UPCs are a gamble. GS1 US sells a single GTIN directly (it listed $30 with no annual renewal fee when we checked), which shows your company as the brand owner. GS1 Canada licenses numbers for Canadian businesses.
- Code 128 for inventory: it mixes letters and numbers like SKU-0012345 and packs long digit runs two per symbol. That example is 12 symbols, 134 modules wide.
- Print black on white and keep the margins. The tool includes the standard quiet zone on both sides. Do not trim into it, and test-scan a printed label before running a batch.
Frequently asked questions
Can I use these barcodes to sell on Amazon or in stores?
The bars are correct and will scan, but the number must be licensed to your company by GS1. Generate the image here once you have a GS1 US or GS1 Canada number, or use any number for internal inventory only.
What is the difference between UPC-A and EAN-13?
UPC-A has 12 digits and is the standard in the US and Canada. EAN-13 has 13 digits and is used internationally. A UPC-A is an EAN-13 with a leading zero, so scanners worldwide read both.
What is a check digit?
The last digit, calculated from the others so a scanner can catch misreads. Type 11 digits for UPC-A or 12 for EAN-13 and the tool adds it; type the full code and it verifies it.
Which barcode should I use for inventory or SKUs?
Code 128. It accepts letters, numbers and symbols at any length, is compact, and every common scanner reads it.
SVG or PNG for printing labels?
SVG is a vector file that stays sharp at any size and works in label software, Word and design apps. PNG is a pixel image; the tool renders it with whole pixels per bar so edges stay crisp.
Sources
- GS1 US: How to Get a UPC Barcode (Last reviewed: October 9, 2026)
- GS1 Canada: Get a Barcode (Last reviewed: October 9, 2026)