Barcode Generator: Free Code 128, EAN-13 & UPC Barcodes
Create free barcodes in Code 128, EAN-13, UPC-A, Code 39, ITF-14 and more. Check digits are added for you, and you can download a PNG or SVG, or make up to 100 barcodes at once.
Barcodes are drawn in your browser and never expire. Before printing a batch, test-scan one with your scanner or phone. Retail EAN and UPC numbers must come from GS1 to be valid in stores.
How to use the barcode generator
This free barcode generator makes Code 128, EAN-13, UPC-A and nine other barcode types right in your browser. Here is how to create one:
- Pick a barcode type. Code 128 is the default and accepts letters, numbers and symbols.
- Type your value. The hint under the box shows what the chosen type accepts, and the preview updates as you type.
- Adjust the bar width (1 to 4), height, margin, font size and colors, and choose whether to show the number under the bars.
- Pick a PNG resolution of 1x, 2x or 4x, then download a PNG or SVG, or copy the image.
- For many labels, switch to Bulk mode, enter one value per line (up to 100) and download each PNG or a single SVG sheet.
The tool is free with no sign-up, and the barcodes never expire. Your values are processed on your device and are not uploaded.
Which barcode type should you use?
The right type depends on where the barcode will be scanned. Retail checkouts expect EAN or UPC, while warehouses, libraries and internal systems usually use Code 128 or Code 39.
| Type | What it holds | Common use |
|---|---|---|
| Code 128 | Any letters, digits and keyboard symbols | Shipping labels, inventory, SKUs |
| EAN-13 | 13 digits | Retail products outside North America, books (ISBN) |
| UPC-A | 12 digits | Retail products in the US and Canada |
| EAN-8 / UPC-E | 8 digits | Small packages with little label space |
| Code 39 | Capital letters, digits and a few symbols | ID badges, industrial and government labels |
| ITF-14 | 14 digits | Outer shipping cartons |
| Codabar | Digits and a few symbols | Libraries, blood banks, older systems |
If the barcode is only for your own shop, warehouse or asset tags, Code 128 is the safest choice. It is compact, reads well on almost every scanner and accepts any text.
How the check digit is calculated
EAN-13, UPC-A, EAN-8 and ITF-14 end in a check digit. Scanners use it to catch misreads, so a barcode with the wrong check digit will not scan at a till. The generator adds it for you when you type the shorter number, and it tells you if a full number you typed has the wrong last digit.
The rule is the same for all four types. Starting from the rightmost digit, multiply the digits alternately by 3 and 1, add the results, then find the amount needed to reach the next multiple of 10:
check digit = (10 − (sum mod 10)) mod 10
Worked example with the UPC-A number 03600029145. Reading from the right, the digits 5, 1, 2, 0, 6 and 0 are multiplied by 3, giving 42. The digits 4, 9, 0, 0 and 3 are multiplied by 1, giving 16. The total is 58. The next multiple of 10 is 60, so the check digit is 2 and the full barcode number is 036000291452.
The same steps turn the EAN-13 number 590123412345 into 5901234123457, with a check digit of 7.
Do you need GS1 numbers for retail barcodes?
A barcode is just a picture of a number, so this tool can draw any valid EAN or UPC. To sell in most stores and on large marketplaces, though, the number itself has to be registered. GS1, the organization that manages EAN and UPC numbers, issues a company prefix that identifies your business. Retailers check that prefix, so a made-up number can be rejected even though it scans.
For anything that stays inside your business, such as stock bins, asset tags, event tickets or price labels in your own shop, you do not need GS1 numbers. Use Code 128 with your own SKU codes instead.
Getting the right print size
Bar width sets how many pixels wide the thinnest bar is. PNG resolution multiplies everything, so a 2x image has twice the pixels in each direction. To work out the printed size, divide the image width in pixels by your printer resolution. A 600-pixel-wide PNG printed at 300 dots per inch comes out 2 inches wide.
Use the SVG download for labels and packaging. SVG is a vector format, so it stays sharp at any size in design and label software. For a QR code that holds a link instead, use the QR code generator.
Tips for barcodes that scan the first time
- Keep dark bars on a light background. Red bars or a dark background often fail on laser scanners.
- Leave the margin (quiet zone) on both sides. Cropping it is one of the most common reasons a barcode will not scan.
- Do not stretch the image sideways in another program. Change the bar width here instead.
- Test-scan one printed label with your scanner or phone before printing a full batch.
- Add barcoded SKUs to your paperwork with the invoice generator, and convert label sizes with the unit converter.
Frequently asked questions
Is this barcode generator free?
Yes. The barcode generator is free with no sign-up, no watermark and no limit on how many barcodes you create. It runs entirely in your browser, so the values you enter stay on your device, and the barcodes you download never expire.
What is the difference between UPC and EAN barcodes?
UPC-A has 12 digits and is used mainly in the US and Canada. EAN-13 has 13 digits and is used in most other countries. A UPC-A number is the same as an EAN-13 number with a leading zero, so modern checkout scanners read both.
Can I make a UPC barcode for my product to sell in stores?
You can draw any valid UPC here, but stores and big marketplaces expect the number to come from GS1, which issues a company prefix to your business. Get your numbers from GS1 first, then enter each one here to create the barcode image.
Which barcode type is best for inventory?
Code 128 is the usual choice for inventory, shelf and asset labels. It accepts letters, numbers and symbols, packs data into a short barcode and reads well on almost every scanner. Code 39 also works but makes longer barcodes for the same text.
Why does my EAN-13 or UPC barcode say the value is not valid?
EAN-13 and UPC-A only accept digits, in the right count. If you type the full number, the last digit must be the correct check digit. Type 12 digits for EAN-13 or 11 digits for UPC-A and the tool adds the correct check digit for you.
Can I create many barcodes at once?
Yes. Switch to Bulk mode and enter one value per line, up to 100 at a time. Each barcode gets its own PNG download button, and you can download all of them as a single SVG sheet to print or import into label software.
Should I download a PNG or an SVG barcode?
Use SVG for printing labels and packaging, because it stays sharp at any size. Use PNG for documents, spreadsheets, emails and websites. For printing a PNG, choose the 4x resolution so the bars stay crisp.