Design, images & QRFree, no sign-up
Free Barcode Generator: UPC-A, EAN-13, EAN-8 and Code 128
Type your number and this barcode generator draws it instantly, adds or verifies the check digit, and hands you an SVG or PNG ready for your label or packaging.
Heads up: to sell through retailers, chains or marketplaces you need a UPC or EAN number licensed from GS1 (in the US, GS1 US). This tool only draws the code you already have: it doesn’t give you an official number. What you type never leaves your browser.
Size and margins
A barcode generator turns a number or a short text into bars and spaces any scanner can read. This free barcode generator draws UPC-A, EAN-13, EAN-8 and Code 128, checks the check digit for you and exports a crisp SVG or a high-resolution PNG.
How to make a barcode in 4 steps
-
Pick the type
UPC-A for retail in the US and Canada, EAN-13 for most other countries, EAN-8 for tiny packs and Code 128 for internal labels with letters.
-
Type the number
Enter 11 digits for a UPC-A and we add the 12th. Enter all 12 and we check that the last one is right.
-
Set the size
Bar height, module width and margin. Keep the white margin on both sides: scanners need that quiet zone to find where the code starts.
-
Download and test
SVG for your printer (it’s vector) and PNG at 4x for documents. Scan it with a barcode app before you print the whole run.
Need a UPC barcode generator for a product listing, or an EAN 13 barcode generator for a European distributor? Same flow: pick, type, download.
Which barcode type should you use?
| Type | What it holds | Best for |
|---|---|---|
| UPC-A | 12 digits | Retail products in the US and Canada |
| EAN-13 | 13 digits | Retail products in most other countries |
| EAN-8 | 8 digits | Small packs with no room for a full code |
| Code 128 | Letters, numbers, symbols | Shipping, inventory and internal labels |
A UPC-A is really an EAN-13 that starts with 0: same 95 modules, same longer guard bars at the edges and center. On a UPC-A, the first and last digits sit outside the bars in a smaller size. Code 128 accepts letters, so it can’t act as a retail product code, but for order numbers and bin locations a code 128 barcode generator is exactly what you want.
How the check digit works
The last digit of a UPC or EAN isn’t random: it’s a check digit that lets the scanner catch a bad read. This is the GS1 method:
1. Multiply the digits by 3 and 1 alternately, starting with the rightmost (×3).
2. Add up the results.
3. Check digit = what's needed to reach the next multiple of 10.
03600029145 → 0×3 + 3×1 + 6×3 + 0×1 + 0×3 + 0×1 + 2×3 + 9×1 + 1×3 + 4×1 + 5×3 = 58 → 2
From 58 to 60 you need 2, so the full UPC-A is 036000291452. Code 128 uses a different check: the start value (104 for set B) plus each character’s value times its position, then the remainder after dividing by 103.
How to read a UPC barcode: what each number means
A UPC-A has 12 digits in four parts, and the printed number is the same one the scanner reads. Take 036000291452, the classic example.
| Part | Digits | Here | What it does |
|---|---|---|---|
| Number system | 1 | 0 | Says what kind of item it is |
| Manufacturer code | 5 | 36000 | Your company, assigned by GS1 |
| Item number | 5 | 29145 | The product, numbered by you |
| Check digit | 1 | 2 | Catches misreads |
The first digit matters. According to Wikipedia, 0, 1 and 6 to 9 are for most products, 2 is for items packed in store and sold by weight, 3 is for drugs, 4 is for loyalty cards and store coupons, and 5 is for coupons. The code carries no price and no name. The scanner reads the number and the store’s system looks up the rest. And like any GS1 number, it shows who issued it, not where the product was made.
What this tool won’t do: give you an official number
Drawing the code is the easy part. To sell through stores, chains or marketplaces, the number has to be yours, and that comes from GS1. In the US, GS1 US licenses either a single GTIN or a company prefix you use to number your products. This is also the honest answer to how to get a barcode for my product: license the number first, then draw it here.
Barcode size: how big to print a UPC-A or EAN-13
Size is where printed barcodes fail most often. GS1 sets it through the X-dimension, the width of the narrowest bar. According to GS1 Sweden’s size guide, an EAN-13 on a consumer item should use 0.33 mm, with 0.264 mm as the smallest allowed and 0.66 mm as the largest.
| Measure | Recommended | Minimum | Maximum |
|---|---|---|---|
| X-dimension | 0.33 mm | 0.264 mm | 0.66 mm |
| Bar height | 22.85 mm | 18.28 mm | 45.70 mm |
Those limits match the 80% to 200% scaling range that Wikipedia gives for a UPC. Now check the math for an EAN-13. 95 modules × 0.33 mm = 31.35 mm of bars, plus white margins of 11 modules on the left and 7 on the right, which makes 37.29 mm. If you export a PNG, give each module a whole number of pixels. At 300 dpi, 0.33 mm is about 4 pixels. Anything fuzzier blurs the edges, and scanners hesitate. For print, use the SVG.
Frequently asked questions about barcodes
How much does a barcode generator cost?
Drawing the barcode itself should cost nothing: this one is free, with no sign-up and no watermark, and it runs in your browser. What can cost money is the number. To sell through retailers you need a UPC licensed from GS1 US, which charges for a single GTIN or a company prefix. Paid barcode software mostly adds batch printing, label layouts and database links on top.
What are the different types of barcodes that can be generated?
Here you can make the four you’ll run into most: UPC-A, the 12-digit retail code in the US and Canada; EAN-13, its 13-digit international version; EAN-8, a short version for small packs; and Code 128, which holds letters and numbers for shipping and inventory. Beyond those there are 2D codes like QR and Data Matrix, which store far more data in a square.
How to make a barcode in Excel?
Excel has no built-in barcode function, so you have two routes. The easy one: generate the barcode here, download the PNG or SVG and insert it with Insert, Pictures. The other is a barcode font, but fonts alone don’t add the check digit or the start and stop patterns, so the code often fails to scan. For a long product list, generate and test a few first.
What is a barcode?
A barcode writes a number or text as bars and spaces of different widths so a scanner can read it instantly, with no typos. The scanner measures those widths, turns them into characters and checks the check digit. Retail codes like UPC and EAN identify a product, Code 128 tracks shipments and stock, and QR codes pack much more data into a square.
How to get a barcode for my product?
In the US, go through GS1 US: you license either a single GTIN for one product or a company prefix that lets you number a whole range. Assign each product its own number, add the check digit, then generate the barcode image here and send the SVG to your printer. Think twice about cheap resold codes if you plan to sell through major retailers: some large stores and marketplaces check who owns a number against GS1’s records.
Can I make my own barcode?
Yes, but it depends on what for. You can generate the barcode picture of any number yourself, and for internal uses like inventory, orders or shipping labels that is all you need: use a Code 128 with your own references. What you cannot invent is a retail number. Stores and marketplaces expect UPC or EAN numbers issued by GS1, and a made-up one could clash with another company’s. This generator draws and checks the barcode, and GS1 gives you the number.