Free Barcode Generator

Make a Code 128, Code 39, EAN-13, EAN-8, UPC-A or ITF-14 barcode with the check digit worked out for you, then download it as a PNG or SVG.

Enter your barcode data

Your barcode

Size and text

How to use the barcode generator

  1. Choose a Barcode format: Code 128 for any text, Code 39 for capitals and digits, EAN-13, EAN-8 or UPC-A for retail numbers, ITF-14 for shipping cartons.
  2. Type the number or text into Data to encode. For the numeric formats, enter all digits or leave off the last one and the tool adds the check digit.
  3. Adjust Bar width, Bar height and Text size, and untick Show the number under the bars if you do not want it.
  4. Pick a PNG size, then press Download PNG or Download SVG. SVG stays sharp at any print size.

How the barcodes are made

The bars are drawn by the open-source JsBarcode library, and the tool adds the checks around it. EAN-13, EAN-8, UPC-A and ITF-14 end in a GS1 check digit: starting from the right of the data digits, multiply by 3, 1, 3, 1 and so on, add the results, and the check digit is what brings the total up to the next multiple of 10. Code 128 adds its own check character automatically. Every barcode gets a blank margin of 10 bar widths on each side, the quiet zone scanners need. ITF-14 can be drawn with the bearer-bar frame that cartons carry, which the library does not provide, so the tool adds it.

Worked example

With the starting settings (Code 128, data ABC-12345, bar width 2, bar height 100) the tool shows a barcode 123 modules wide, drawn as a 286 x 138 px image, with the text under the bars. For an EAN-13, enter 123456789012. Counting from the left, the digits are weighted 1, 3, 1, 3 and so on: 1 + 6 + 3 + 12 + 5 + 18 + 7 + 24 + 9 + 0 + 1 + 6 = 92. The next multiple of 10 is 100, so the check digit is 8 and the tool encodes 1234567890128. If you type all 13 digits and the last one is wrong, the tool says what it should be and offers to fix it.

Limits and edge cases

Frequently asked questions

Which barcode type should I use?

Use Code 128 for inventory, shipping labels and any text. Use EAN-13 or UPC-A for products sold in stores, EAN-8 for very small packs, and ITF-14 for outer cartons. Code 39 is mostly for older systems that already expect it.

What is the difference between EAN-13 and UPC-A?

UPC-A has 12 digits and is used in the United States and Canada. EAN-13 has 13 digits and is used elsewhere. A UPC-A is an EAN-13 with a leading 0, and current scanners read both.

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

The image is valid, but the number must be unique. Retail barcode numbers are assigned through GS1 member companies, and stores and marketplaces can check them. Use this tool for internal stock codes, tests, or numbers you have already licensed.

How do I make sure a printed barcode scans?

Print black bars on a white background, keep the blank margin, and never shrink below the minimum size. Choose the largest PNG size or the SVG, then test the printout with a phone and a real scanner.

For a square code that holds links or Wi-Fi details, use the QR code generator. To read one back, try the QR code reader, and for unique record IDs use the UUID generator.

Sources: GS1, how to calculate a check digit manually; GS1, EAN/UPC barcodes; JsBarcode 3.12.3 (MIT).