Barcode Generator

Generate scannable barcodes for products, inventory, shipping cartons and labels. Pick a format, type your number and download a crisp PNG or SVG. Check digits are calculated and verified automatically.

100% freeNo sign-upRuns in your browserWorks on mobile

12
20100 px
1018 px
010 px

How to use the Barcode Generator

  1. Choose the barcode type. Use EAN-13 or UPC-A for retail products, Code 128 for general text and ITF-14 for shipping cartons.
  2. Type the number or text. For EAN, UPC and ITF-14 you can leave off the last digit and the check digit is added for you.
  3. Adjust bar width, height, text and colors while watching the preview.
  4. Download a PNG (2× or 4× for printing) or an SVG, then test-scan a printout before using it on labels.

Features

  • Nine formats: Code 128, EAN-13, EAN-8, UPC-A, Code 39, ITF-14, Codabar, MSI, Pharmacode
  • Automatic GS1 check digits with a step-by-step explanation
  • Clear validation messages for each format’s rules
  • Adjustable bar width, height, text size, margin and colors
  • High-resolution PNG and vector SVG downloads
  • Generated in your browser with no upload or account

Choosing the right barcode format

Barcodes are not interchangeable. Each format was designed for a particular job, and scanners in shops, warehouses and libraries are configured for the formats they expect.

FormatCharactersTypical use
EAN-1313 digitsRetail products sold worldwide; books (ISBN starts with 978 or 979)
UPC-A12 digitsRetail products in the United States and Canada
EAN-88 digitsSmall retail items with little label space
ITF-1414 digitsOuter cartons and cases in logistics
Code 128Any ASCII textShipping labels, internal tracking, asset tags
Code 39A–Z, 0–9, 7 symbolsID badges, inventory, automotive and defense
Codabar0–9 and - $ : / . +Libraries, blood banks, older parcel systems
MSI Plessey0–9Retail shelf labels and warehouse bins
PharmacodeNumber 3–131070Pharmaceutical packaging control

How check digits work

EAN-13, EAN-8, UPC-A and ITF-14 all end with a GS1 check digit that lets a scanner detect a misread. To calculate it, start from the rightmost digit of the number (without the check digit) and multiply the digits alternately by 3 and 1. Add the results, then find how much you need to reach the next multiple of 10.

Worked example (EAN-13): for 590123412345, the digits from the right are 5, 4, 3, 2, 1, 4, 3, 2, 1, 0, 9, 5. Weighted by 3, 1, 3, 1… they give 15 + 4 + 9 + 2 + 3 + 4 + 9 + 2 + 3 + 0 + 27 + 5 = 83. The next multiple of 10 is 90, so the check digit is 7 and the full number is 5901234123457. This tool shows the same calculation for whatever you type, and warns you if a 13-digit number has the wrong final digit.

Code 128 has its own modulo-103 check character, which is built into the symbol and never printed in the human-readable text. Code 39 can optionally carry a Mod 43 check character, and MSI supports several Mod 10 and Mod 11 schemes. Match these settings to what your scanner expects.

Getting real product barcodes

This generator draws a correct barcode for any valid number, but it cannot give you a number to sell products in stores. Retail EAN and UPC numbers must come from GS1, the organization that licenses company prefixes, so that no two products share a code. Marketplaces and large retailers check numbers against the GS1 database. For internal use, such as stock rooms, libraries or event tickets, Code 128 or Code 39 with your own numbering scheme works well.

Printing tips

  • Keep dark bars on a light background; red bars are invisible to many laser scanners.
  • Leave the white margin (quiet zone) on both sides. Cropping it is the most common reason labels fail.
  • Do not stretch the image unevenly. Scale the SVG proportionally or download the 4× PNG.
  • Print a test label and scan it with the actual scanner you will use.

Need to store a web link or more text? A QR code holds far more data in less space.

Frequently asked questions

Can I use these barcodes on products I sell in stores?

The images are valid and scannable, but retail stores require numbers licensed from GS1 so they are unique worldwide. Generate the barcode here once you have your GS1 number.

What is a check digit and do I need to type it?

It is the last digit of EAN, UPC and ITF-14 numbers, calculated from the others to catch scanning errors. Leave it off and the tool adds it, or type it and the tool verifies it.

Which format should I use for inventory labels?

Code 128 is the best general choice: it is compact, accepts letters and digits and is read by virtually every scanner. Use Code 39 only if an older system requires it.

Why is my barcode not scanning?

Check for low contrast, a missing white margin, bars printed too small or a scanner that is not set up for that format. Increasing the bar width to 2 or 3 usually helps with cheap printers.

Should I download PNG or SVG?

SVG is a vector format that stays sharp at any size and suits print design software. PNG at 2× or 4× works well for documents, label printers and websites.

More generators

Other free tools you might need next.

View all 11