ToolHub

Barcode Generator

Create Code 128, EAN, UPC barcodes — download PNG or SVG

Code 128 handles any text and is the best default. EAN/UPC are for retail products and need an exact digit count. Download as a crisp PNG or scalable SVG. Generated entirely in your browser.

Overview

What this tool does

Generate barcodes in the most common formats — Code 128, EAN-13, EAN-8, UPC-A, Code 39, ITF-14, MSI, and Pharmacode. Type your value, adjust the size and label, and download a crisp PNG or a scalable SVG. It runs entirely in your browser.

Pick the right format

Which barcode type to use

Best forInput
Code 128General use — any text or numbersletters + digits
EAN-13International retail productsexactly 13 digits
EAN-8Small retail packagesexactly 8 digits
UPC-AUS/Canada retailexactly 12 digits
Code 39Industrial, ID badgesletters + digits
ITF-14Shipping cartonsexactly 14 digits

When in doubt, use Code 128

Code 128 is the most flexible — it encodes any letters and numbers, is compact, and is scanned everywhere. Only reach for EAN or UPC when you have an official retail product number that must follow that standard.

Two different things

Barcode vs QR code

A traditional barcode (the kind this tool makes) is a 1D pattern of vertical bars that stores a short value like a product number. A QR code is a 2D square pattern that stores much more data, including URLs and text. Use a barcode for product labels and inventory; use a QR code (we have a separate generator) for links and rich data.

Which to choose

PNG vs SVG download

  • PNG — a ready-to-use image for documents, screens, and quick printing
  • SVG — vector graphics that scale to any size without blurring, ideal for printed labels and packaging at high resolution

Important

Selling products with barcodes

You need an official number to sell in retail

This tool draws a barcode for any value you enter, but to sell a product through retailers you need a registered GTIN (the number itself) from GS1 or an authorized reseller. The barcode image is just a visual encoding of that number — it does not register or reserve it.

Behind the scenes

Privacy and how it runs

Runs in your browser

Barcodes are generated locally with the jsbarcode library. Your data is never uploaded.

Common questions

How do I make a barcode for free?

Pick a format, type your value, and download the PNG or SVG. For general text and numbers, Code 128 is the easiest choice and works with most scanners.

Why does my EAN or UPC number show an error?

Those formats require an exact digit count and a valid check digit. If the count is wrong (EAN-13 needs 13 digits, UPC-A needs 12), correct it, or switch to Code 128, which accepts any input.

Will the barcode scan correctly?

Yes, as long as you print it large enough and with good contrast (black bars on white). Download the SVG for printing so the bars stay sharp at any size. Test with a scanner or phone app before mass-printing labels.

What's the difference between EAN and UPC?

Both are retail barcodes. UPC-A (12 digits) is used mainly in the US and Canada; EAN-13 (13 digits) is the global standard and is essentially UPC-A with an extra leading country digit.

Can I change the barcode size?

Yes — adjust the bar width and height sliders, and toggle the text label on or off. For print, download the SVG and scale it in your design software without losing quality.

Related tools

Quick steps

1

Pick a barcode type

Code 128 works for any text. EAN, UPC, and ITF are for specific product and shipping standards with exact digit counts.

2

Enter your value

Type the text or number to encode. The barcode renders live; errors are flagged if the value doesn't fit the format.

3

Download

Adjust the size, then download a crisp PNG or a scalable SVG for print.

Frequently asked questions

Which barcode type should I use?

Code 128 is the best default — it encodes any letters and numbers and is widely scanned. Use EAN-13 or UPC-A only for retail products with an official number, EAN-8 for small packages, and ITF-14 for shipping cartons.

What's the difference between EAN and UPC?

Both are retail product barcodes. UPC-A (12 digits) is used mainly in the US and Canada; EAN-13 (13 digits) is the international standard. EAN-13 is essentially UPC-A with a country-code digit added in front.

Why does my number show an error?

EAN and UPC require an exact digit count (EAN-13 = 13, UPC-A = 12, EAN-8 = 8) and a valid check digit. If the count is wrong, switch to Code 128, which accepts any input, or correct the digits.

Should I download PNG or SVG?

PNG is a ready-to-use image for documents and screens. SVG is vector — it scales to any size without blurring, which is best for printing labels and packaging at high resolution.

Can I sell products with these barcodes?

You can generate the image, but to sell in retail you need an official, registered GTIN (the number) from GS1 or an authorized reseller. This tool draws the barcode for any number you provide; it does not register numbers.

Is the barcode generated privately?

Yes. Everything runs in your browser using the jsbarcode library. Your data is never uploaded.