Barcode Generator
Type your text or product number and download a scannable barcode. Generated in your browser, with no watermark and no account.
Which barcode type do you need?
Use Code 128 for anything internal and EAN-13 for anything sold in a shop. Code 128 encodes any printable ASCII — letters, digits and punctuation — which makes it the standard for inventory labels, shipping, asset tags and library books. EAN-13 encodes exactly 13 digits and is the retail barcode scanned at tills worldwide. The critical difference is that EAN-13 numbers must be bought from GS1: you cannot invent one and expect a shop to accept it.
Code 128 and EAN-13 compared
| Code 128 | EAN-13 | |
|---|---|---|
| Encodes | Any printable ASCII | Exactly 13 digits |
| Length | Variable | Fixed |
| Typical use | Inventory, shipping, asset tags | Retail products at checkout |
| Needs registration | No — use any value you like | Yes, numbers come from GS1 |
| Check digit | Built in, calculated automatically | 13th digit, calculated here |
Code 128 also switches automatically between its sub-sets as it encodes, packing long digit runs two-to-a-symbol. That is why a numeric code produces a noticeably shorter barcode than the same length of letters.
You cannot invent a retail barcode
This is the single most common misunderstanding, and it costs people money.
EAN-13 and UPC numbers are allocated by GS1, which issues each business a unique company prefix. You then assign your own product numbers within that prefix. Retailers verify that a barcode resolves to the registered owner, so a made-up number will be rejected — and duplicate numbers cause genuine chaos at checkout.
Cheap barcode numbers resold on marketplaces are usually recycled from prefixes issued before GS1 tightened its licensing. Many major retailers refuse them outright. If you are selling through shops, buy the prefix properly.
For anything internal — stock control, equipment tags, event tickets, library books — Code 128 needs no registration at all. Use whatever numbering makes sense to you.
Printing barcodes that scan first time
- Use SVG. Barcodes are line art; scaling a PNG blurs the bar edges, which is exactly what scanners measure.
- Never stretch horizontally. The relative bar widths carry the data. You can change the height freely, but the width must scale proportionally.
- Keep the quiet zone. The white margin at each end must be at least ten times the narrowest bar width. It is included here — do not crop it.
- Print dark on light, at high contrast. Black on white scans best; red bars are effectively invisible to older red-laser scanners.
- Avoid glossy laminate where possible, since reflections defeat laser scanners.
- Test with an actual scanner, not just a phone app — phone cameras are considerably more forgiving than warehouse hardware.
How to use the Barcode Generator
- Choose Code 128 for text or internal codes, or EAN-13 for a retail product number.
- Type your content. For EAN-13, 12 digits is enough — the check digit is added automatically.
- Set the bar height and whether the value prints underneath.
- Download SVG for printing, or PNG for screens and documents.
Frequently asked questions
Are these barcodes free to use commercially?
The generated images are, with no watermark or licence conditions. But an EAN-13 number for retail sale must be licensed from GS1 — that is about the number, not the picture of it.
What is the check digit?
A digit calculated from the others that lets a scanner detect misreads. For EAN-13 it is the 13th digit, and this tool calculates it for you if you enter only 12.
Why is my EAN-13 rejected as invalid?
Almost always a wrong check digit. Enter just the first 12 digits and the correct one is added automatically. If you entered 13, the error message shows what the last digit should be.
Can I use Code 128 for my own inventory?
Yes, freely. Code 128 needs no registration, so you can number your stock however you like — that is exactly what it is for.
Is UPC-A the same as EAN-13?
Effectively, yes. A UPC-A is a 12-digit code that becomes a valid EAN-13 with a leading zero, so entering a UPC here with a 0 in front produces the correct barcode.
Are my codes sent anywhere?
No. Encoding happens entirely in your browser, so your product numbers are never transmitted.
Related tools
Last reviewed September 4, 2026. Results are estimates for general information only.