Free Barcode Generator for UPC, EAN and Code 128
By TheToolsBank Editorial TeamLast updated:
How to make a barcode
- Type your text or number into Value to encode.
- Choose a Format. Code 128 is the default. In the menu,
UPCmeans UPC-A. - Set Bar width (1 to 4), Height (40 to 200 pixels), and the bar and background colors.
- Press Download PNG to save
barcode.png, or Download SVG for sharp printing.
If the value does not fit the format, a red message says why, such as a wrong character, length or check digit. The download buttons stay off until you fix it.
Which barcode format to choose
| Format | What you can enter | Typical use |
|---|---|---|
| Code 128 | Letters, numbers, symbols (ASCII) | Shipping, inventory, asset tags |
| Code 39 | A–Z, 0–9, space, - . $ / + % | Older warehouse and badge systems |
| EAN-13 | 12 digits, or 13 with check digit | Retail outside North America |
| EAN-8 | 7 digits, or 8 with check digit | Small retail packs |
| UPC-A (listed as UPC) | 11 digits, or 12 with check digit | Retail in the US and Canada |
| ITF-14 | 13 digits, or 14 with check digit | Outer cartons and cases |
| ITF (Interleaved 2 of 5) | An even number of digits | Warehouse and distribution labels |
| MSI | Digits only | Store shelf labels |
| Pharmacode | Whole number 3 to 131070 | Pharmaceutical packaging |
For your own labels and scanner, Code 128 is the safest pick. It is compact and reads almost any text. Code 39 turns lowercase into capitals, so abc becomes ABC.
How UPC and EAN check digits work
The last digit of a UPC or EAN is a check digit that helps scanners catch misreads. Enter one digit fewer than the full length and the tool adds it. Enter the full length and the last digit must be correct. Here is the math for UPC-A 03600029145:
- Add the digits in odd positions: 0 + 6 + 0 + 2 + 1 + 5 = 14. Multiply by 3 to get 42.
- Add the digits in even positions: 3 + 0 + 0 + 9 + 4 = 16.
- Add both: 42 + 16 = 58.
- The check digit reaches the next multiple of 10: 60 − 58 = 2. The full code is
036000291452.
EAN-13 works the same way. For example, 400638133393 gets the check digit 1.
Selling in stores? You need a GS1 number
This tool can draw any UPC or EAN barcode, but it cannot give you a valid product number. Retail numbers start with a company prefix licensed by GS1, the organization that manages these codes. Retailers and marketplaces check that the number belongs to your brand. A made-up number may clash with another company's product.
Once GS1 issues your numbers, make the image here. For stock rooms, libraries or equipment tags you do not need GS1. Use Code 128 with your own codes. For links or longer text, use the QR Code Generator.
Getting a barcode that scans when printed
- Keep dark bars on a light background. Low contrast and inverted colors often fail to scan.
- Use a bar width of 2 or more for small labels or basic printers.
- Keep the white margin on each side. Scanners need this quiet zone.
- If you resize the PNG, keep the proportions. The Image Resizer can do this.
- Scan a printed test copy before printing a full batch.
Common Mistakes to Avoid
Making up a UPC or EAN number for products you plan to sell
Solution:
Typing all 13 EAN-13 digits with a wrong check digit
Solution:
Using light bars or a colored background
Solution:
Typing letters into an EAN, UPC or ITF-14 barcode
Solution:

