Barcode Generator
Make Code 128, EAN, UPC and other barcodes.
The general-purpose one. Any text, any length — use this unless you've been told otherwise.
Encoding SKPL-2026-0042.
Runs entirely in your browser — nothing you enter is uploaded or sent to a server.
We work out the check digit and draw the bars correctly, but we can't know whether a number is yours to use — retail EAN and UPC numbers are allocated to a company by GS1, and inventing one puts your product under someone else's code. Always test a printed barcode with a real scanner before a print run. Read our full disclaimer.
About this tool
A barcode is just a number written in a way a scanner can read quickly, and which format you need depends on where it's going. Code 128 is the general-purpose one — any text, any length — and it's what you want for internal labels, asset tags and shipping references. EAN-13 and UPC-A are the retail codes on products in shops. ITF-14 goes on outer cartons. Codabar still turns up in libraries and blood banks. Pick the format, type the value, and the barcode is drawn in your browser as vector artwork you can print at any size.
Example
Choose EAN-13 and enter the 12 digits 590123412345. The check digit works out to 7, so the finished barcode encodes 5901234123457 — the same number you'd see printed beneath the bars in a shop.
How to use
- 1Pick the barcode type — Code 128 if you're not sure and nobody has told you otherwise.
- 2Type the value. For EAN, UPC and ITF-14 you can leave off the last digit and we'll calculate it.
- 3Adjust the size, and turn the printed number underneath on or off.
- 4Download the SVG for print, or the PNG to drop into a document.
Features
- Seven formats: Code 128, Code 39, EAN-13, EAN-8, UPC-A, ITF-14 and Codabar.
- Check digits calculated for you — and a wrong one is rejected rather than silently encoded.
- Vector SVG output, so it stays sharp at any print size, plus a high-resolution PNG.
- Quiet space is included either side, which is what most home-made barcodes get wrong.
Frequently asked questions
What's a check digit, and why does it matter?
It's the last digit of a retail barcode, calculated from the others as a self-check. If you type it wrong, the barcode still scans perfectly — it just scans as a different number. That's why we recalculate it and refuse a value whose check digit doesn't match, rather than drawing it anyway.
Which format should I choose?
Code 128 for anything internal — asset tags, shelf labels, order references — because it takes letters as well as numbers. EAN-13 or UPC-A only if you're putting a product on a shop shelf and have been allocated a number. ITF-14 for outer shipping cartons.
Can I invent my own EAN or UPC number?
Not for anything sold in shops. Retail numbers are allocated by GS1 to a specific company, and a made-up one will either fail at the till or point at somebody else's product. For your own internal tracking there's no such restriction — use Code 128 and put whatever you like in it.
Why won't my printed barcode scan?
Nearly always size or margin. Barcodes need clear white space either side (we include it — don't crop it off), enough width that the narrowest bar survives your printer, and good contrast. Print it, scan it with a phone, and only then commit to a run of labels.
SVG or PNG?
SVG for anything printed — it's vector, so it stays perfectly crisp whatever size you scale it to. PNG is easier to paste into a document or slide, and ours is rendered at four times the display size so it holds up in print too.
More developer tools
View allQR Code Generator
Generate a QR code for any text or URL and download it as a sharp SVG or PNG — encoded entirely in your browser, nothing uploaded.
Open toolQR Code Reader
Read the contents of a QR code — from a photo, a screenshot, or your camera — and see the link, text, or Wi-Fi details it holds, decoded right in your browser.
Open toolRandom String Generator
Generate random strings at any length from the character sets you choose — lowercase, uppercase, numbers, symbols — copy them one at a time or all at once.
Open tool