Barcode generator
Create an EAN-13 (products) or Code-128 (text and numbers) barcode and download it as PNG or SVG. Everything runs in your browser, no data is ever sent online.
EAN-13 or Code-128?
EAN-13 is the 13-digit code printed on retail products: enter 12 digits and the thirteenth (check digit) is computed for you. Code-128 is more flexible and encodes letters, numbers and symbols: perfect for internal warehouse codes, labels, shipping and inventory.
PNG or SVG for printing?
To print labels choose SVG: being a vector it stays sharp at any size, which is essential for the scanner to read the bars well. PNG is fine for on-screen use or in documents.
The check digit is not just any number
The last digit of an EAN-13 is not part of the code, it is a check calculated from the other twelve: the digits are summed alternating weight 1 and weight 3, and the final digit is the one that brings the total to the nearest multiple of ten. It exists so a scanner rejects a bad read instead of accepting it.
It is why an invented code almost never scans: the chance that twelve random digits already have the right thirteenth is one in ten. If the code has to work in a real shop, the leading digits are not invented at all: they identify the country and the company, and they are assigned.
The white space counts as much as the bars
Around the code you need an empty margin of at least ten times the narrowest bar on each side. These are the «quiet zones», and a label printed flush to the edge or inside a frame will not scan, even if the bars are perfect.
The other classic mistake is shrinking the code to make it fit: below 80% of nominal size the bars merge in printing. Contrast must stay high too: black bars on white always work, red bars on a dark background almost never, because many scanners use a red light that cannot see red.
A barcode does not contain the price
On a product label the code identifies the item, not what it costs: the price lives in the till's database. It is why the very same code costs different amounts in two shops, and why changing a price requires reprinting nothing.
The exception is variable-weight codes from fresh counters, which start with 2 and carry the weight or the amount worked out by the scale: those are valid only inside the shop that printed them. If a code starts with 2, do not look it up online.
Nearby tools
If you need a code containing an address or a text, the way through is QR code generator, and to read one back Read a QR code. To print labels in rows on a sheet, look at Images to PDF.