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
-
Enter the value
Type the number or text you want to encode — for EAN-13/UPC, use the correct digit count for that standard.
-
Choose a format
Select CODE128 for general-purpose use, EAN-13 for retail products, or UPC for US/Canada retail.
-
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
-
Three common formats
CODE128, EAN-13, and UPC cover the vast majority of everyday and retail barcode needs.
-
Instant validation
If a value doesn't fit the chosen format, you'll get a clear message telling you what to fix instead of a blank result.
-
Free & unlimited
Generate as many barcodes as you need, with no account and no usage cap.
-
Private by design
Barcodes are rendered entirely in your browser — the values you enter are never sent anywhere.
-
Scannable, high-quality SVG
Output is a crisp vector image, so it stays sharp at any print size.
-
No software to install
Works directly in the browser — no barcode design app required.
Where to use a barcode
-
Inventory & warehouse labels
Generate CODE128 labels to track stock, bins, or assets internally.
-
Retail product packaging
Create EAN-13 or UPC codes for products sold in stores (pair with a properly registered GS1 number for retail sale).
-
Asset tagging
Label equipment, tools, or files with a scannable code for quick lookup.
-
Event & ticket check-in
Encode a ticket ID or reference number that staff can scan at the door.
-
Small business point-of-sale
Generate barcodes for a homemade or small-batch product line before it's registered with GS1.
-
Library & document systems
Tag books, files, or samples with a unique, scannable identifier.
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
- Match the format to your use case — use CODE128 for internal/flexible needs, and EAN-13/UPC only if you have (or are applying for) an official GS1 number for retail sale.
- Check the digit count — EAN-13 needs exactly 12-13 digits and UPC needs 12; the tool will tell you if your value doesn't fit.
- Keep enough white space — leave a small quiet zone (blank margin) around the barcode so scanners can find its edges.
- Print at a readable size — a barcode shrunk too small can blur the bars together; test a printed copy with a real scanner before printing at scale.
- Don't stretch or distort the image — resize proportionally, since stretching a barcode unevenly changes the bar-width ratios and can make it unreadable.
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.