Barcode Generator

Make a scannable barcode in any common format.

Barcode

About this converter

Code 128 for anything internal — asset tags, shelf labels, job numbers — because it takes any ASCII text and packs it tightly. The retail formats are there for when something else decides the rules.

EAN and UPC codes are allocated, not invented. They identify a product globally, and the number belongs to a company that registered it with GS1. A made-up one will scan perfectly and collide with somebody else's product, so generate those only from a number you have been assigned.

The check digit is calculated for you: enter 12 digits for an EAN-13 or 11 for a UPC-A and the last one is worked out. Enter the full number and it is verified instead, which catches a transcription error before it reaches a printer.

The output is SVG, which matters more for barcodes than for most things — a scanner reads the width of the bars, and a rescaled bitmap blurs exactly the edges it measures.

Frequently asked questions

Which type should I use?

Code 128 unless something else is dictating the choice. It holds letters, digits and punctuation, and is what most internal labelling uses. EAN-13 and UPC-A are for retail products and need a number registered with GS1. Code 39 is older and less dense — use it only when an existing system requires it.

Can I make my own EAN-13 for a product?

Not legitimately. Those numbers are allocated by GS1 to identify a specific product from a specific company, and an invented one will collide with a real product somewhere. For internal use where nothing leaves your own systems, Code 128 does the job with no registration at all.

What is a check digit?

A final digit calculated from the others, so a scanner can tell it read the code correctly. Enter 12 digits for an EAN-13 and it is added for you; enter all 13 and it is checked, which catches a typo before anything gets printed.

Why will my value not encode?

Each type accepts different data. EAN and UPC take a fixed number of digits and nothing else; Code 39 takes capitals, digits and a handful of symbols; only Code 128 takes arbitrary text. The message on screen says what the chosen type expects.

Will it scan if I print it small?

Up to a point, and it depends on your printer more than on the file. The SVG is resolution-independent, so the limit is how precisely the bars are laid down on paper. Test with a real scanner before committing to a print run, and keep the white margin either side.

Does what I paste get sent anywhere?

No. Everything runs in your browser, on your own machine. Nothing is uploaded and nothing is logged. That matters more here than on most pages — source code, database queries and internal data are exactly the things that get pasted into tools like this, and most of them are a form that posts to a server.

Related tools