Developer tool

Barcode generator

Make a barcode as a downloadable PNG, in the page.

Barcode generator Runs on your device
  • Runs in your browser — your text is never sent anywhere
  • No sign-up, no quotas, free to use as often as you like

How it works

Barcodes encode a number or a short string as bars a scanner can read. Which format you need is decided by what will scan it, and picking the wrong one is the usual reason a generated barcode does not work.

Choosing a format

Code 128 accepts almost any text and is the right default for internal use — asset tags, shelf labels, tracking references. EAN-13 and UPC-A are retail product codes and must be genuine numbers issued to you; you cannot invent one and expect a shop's system to accept it. Code 39 is older, takes capitals and digits, and is still common in logistics and libraries.

Why a value gets rejected

Each format has strict rules about length and characters, and most calculate a check digit from the value. EAN-13 wants 12 or 13 digits, UPC-A wants 11 or 12, and Pharmacode only accepts a number in a particular range. When a value does not fit, you are told which format you chose and what it expects rather than being handed an invalid image.

Printing so it scans

Print at actual size, in solid black on white, with clear space either side of the bars. Scaling a barcode down until the bars blur is the most common cause of a code that will not read. Keep the value shown underneath unless something else prints it, because it is what lets a person type the number in when scanning fails.

Barcodes and QR codes are different

A barcode holds a short value in one dimension. A QR code holds far more and is read by phone cameras. If you want something a customer will scan with a phone, you almost certainly want the QR code generator instead.

FAQ

Barcode generator — questions

Which barcode format should I use?

Code 128 for internal use. EAN-13 or UPC-A only if you have a genuine retail code issued to you.

Why was my value rejected?

Each format limits length and characters and computes a check digit. The error names the format and what it expects.

Can I make my own retail barcode?

You can generate the image, but retail codes must be issued to you by GS1 to work in shops.

Is my data uploaded?

No. The barcode is drawn in your browser.