Barcode Generator

Generate a CODE128, EAN-13, or UPC barcode from any value. Everything happens in your browser.

How to create a barcode in 3 steps

  1. Enter the value

    Type the number or text you want to encode — for EAN-13/UPC, use the correct digit count for that standard.

  2. Choose a format

    Select CODE128 for general-purpose use, EAN-13 for retail products, or UPC for US/Canada retail.

  3. Generate and download

    Click "Generate barcode" to render it instantly, then save the image or print it directly from the page.

Why use this barcode generator

Where to use a barcode

What is a barcode?

A barcode is a machine-readable representation of data using parallel lines (1D) of varying widths and spacing. A scanner reads the pattern by measuring the width of each bar and gap, then decodes it back into the original number or text — usually in a fraction of a second.

Different barcode formats (or "symbologies") exist for different purposes. CODE128 is a flexible, general-purpose format that can encode letters, numbers, and symbols, commonly used for internal tracking. EAN-13 and UPC are retail standards: EAN-13 (13 digits) is used internationally, while UPC (12 digits) is standard in the US and Canada — both require officially registered numbers to be globally unique when used for real retail products.

Tips for a barcode that always scans

Frequently asked questions

Which barcode formats are supported?
CODE128 (general purpose, any characters), EAN-13 (retail products, 12-13 digits), and UPC (12 digits, common in the US/Canada).
Is this barcode generator free?
Yes, generating and downloading barcodes is free, with no sign-up.
Can I use these barcodes commercially?
The barcode image itself is free to use. For retail products, EAN/UPC numbers should be properly registered with GS1 to be globally unique.
Is my data sent to a server?
No. The barcode is generated entirely in your browser using JavaScript.
What's the difference between CODE128, EAN-13, and UPC?
CODE128 is a flexible format for letters, numbers, and symbols, mainly used for internal tracking. EAN-13 (13 digits) and UPC (12 digits) are retail standards used at checkouts worldwide (EAN-13) or mainly in the US/Canada (UPC), and normally require an officially registered GS1 number for real retail use.
Why do I get an error when generating my barcode?
The value you entered does not match the chosen format's rules — most often, EAN-13 or UPC needs a different number of digits than you typed. Switch to CODE128 if you just need to encode an arbitrary value.
Can I generate a barcode for a product I plan to sell in stores?
You can generate the image here, but for it to work at a real checkout, the underlying number (EAN-13/UPC) needs to be officially registered with GS1 so it's globally unique — this tool doesn't register numbers, only renders the image.
What image format do I get?
The barcode is rendered as a crisp SVG, which stays sharp when resized or printed at any scale.

Related tools