EAN-13 The retail barcode used on almost every product outside North America. Accepts Digits. 12 or 13 digits.
Barcode Generator
Type a number, pick a format, and take away a barcode that scans.
About the Barcode Generator
What is a barcode generator?
A barcode is a number written in bars so a laser or a camera can read it faster than a person can type it. A barcode generator turns your number into that pattern. The hard part is not the drawing, it is the rules, because every format has its own alphabet, its own length limits and its own check digit math, and getting any of them wrong produces a picture that looks like a barcode but will not scan at the till.
This one runs entirely in your browser and covers sixteen formats, from the EAN-13 on a can of beans to the Pharmacode on a blister pack. We wrote the encoders from the published specifications and then checked every symbol against an independent reference implementation, roughly 46,000 comparisons across all sixteen, so what you download here matches what a professional label printer would produce.
How to Use This Tool
- Pick a barcode type. The note under the dropdown tells you what that format accepts and how long the value has to be.
- Type your value. The barcode redraws as you type, and if something is wrong you get a plain explanation rather than a blank box.
- If the check digit is off, click the repair button in the error message and we drop in the correct number.
- Adjust bar width, height, colors and margin until it suits the label you are printing on.
- Download a PNG for screens or a SVG for print, or hit Print to lay several out on a page.
- Need a lot of them? Switch to Batch, paste a column of values or build a numbered run, then grab the whole set as a ZIP.
Common Use Cases
Barcodes show up in more places than retail, and the format you want depends entirely on where the label is going.
- Retail products. EAN-13 outside North America, UPC-A inside it. Both carry a GS1 company prefix, so the number itself has to come from GS1 before a store will scan it.
- Warehouse and asset tags. Code 128 packs the most data into the least width and handles letters, which is why almost every internal tracking system uses it.
- Shipping cartons. ITF-14 for the case code and GS1-128 when you need to carry a batch number or an expiry date alongside the item number.
- Books and magazines. ISBN-13 with the optional five digit price add-on, which is that second narrow barcode next to the main one.
- Libraries, blood banks and photo labs. Codabar is old but it is still what a lot of that equipment expects.
- Event tickets and membership cards. Build a numbered run in batch mode, print the sheet, and every ticket has its own code.
Frequently Asked Questions
Which barcode type should I use?
If it is a product going on a shop shelf, use EAN-13 in Europe, Asia and most of the world, or UPC-A in the United States and Canada. For anything internal, such as asset tags, shelf labels or job sheets, use Code 128, which handles letters and numbers and stays compact. Use ITF-14 for shipping cases and Code 39 only when a piece of older equipment specifically asks for it.
What is a check digit and do I need one?
It is one extra digit at the end, worked out from the digits before it, that lets a scanner tell whether it read the code correctly. EAN, UPC, ISBN and ITF-14 all require one, and this tool calculates it for you when you leave it off. Code 39, Codabar and MSI treat it as optional, so there is a toggle for those. Code 128 and Code 93 carry their own check characters inside the symbol where you never see them.
Can I sell a product with a barcode I made here?
You can print the barcode, but you cannot invent the number. Retail barcodes carry a GS1 company prefix, and GS1 is the only body that issues those. Buy a prefix from them, or a single number from a licensed reseller, then generate the symbol here. For internal use, warehouses, ticketing, asset tracking, anything that never touches a retail checkout, you can pick any number you like.
What is the difference between UPC and EAN?
EAN-13 is thirteen digits, UPC-A is twelve, and a UPC-A is really just an EAN-13 with a leading zero. Every modern scanner reads both. The practical difference is regional: UPC-A came out of North America and is still what US and Canadian retailers expect, while EAN-13 is the international standard. If you already have a UPC-A and need the EAN-13, put a zero in front.
Why will my barcode not scan?
Four things cause most failures. The bars are too narrow, so print at a bar width of 3 or higher and use the SVG rather than a small PNG. There is not enough white space at each end, which the standards call the quiet zone, so leave the margin at 8 or more. The contrast is too low, since scanners want dark bars on a light background and red bars on white are invisible to a red laser. Or the barcode was scaled non-uniformly at some point, which stretches the bars out of ratio.
Should I download the PNG or the SVG?
SVG for anything that will be printed. It is vector, so it stays sharp at any size and the bar edges land exactly where they should. PNG for screens, emails and systems that will not take a vector file, and in that case bump the PNG size to 4x so the bars do not blur when the file is resized. If you need it inside a web page, the Copy data URI button gives you a string you can paste straight into an img tag.
Can I generate a lot of barcodes at once?
Yes. Batch mode takes up to 250 values, one per line, and draws them all. If your codes are sequential, the numbered run builder fills the list for you from a start value, a count and a step, with optional prefix and suffix text. The ZIP download gives you every barcode as a separate SVG file, named after its value, and the Print button lays the whole set out on a sheet.
Is anything I type sent to your server?
No. The encoders run in JavaScript on your own machine, so the product codes, serial numbers and batch data you enter never leave the browser. That also means the tool keeps working if your connection drops mid-session. If you want a two dimensional code instead, our QR Code Generator works the same way.