Barcode Generator

Pick a type, type what the barcode should say, and save it as a PNG or an SVG. For EAN and UPC the last digit is worked out for you. It is all drawn in your browser, so nothing is uploaded.

Your barcode
—Modules wide
—Check digit
—Image size (px)

Scan a test print with a phone before you print many. This page draws whatever number you give it; it does not reserve one, and the numbers on goods sold in shops are issued by GS1, not by this site.

How to make a barcode

  1. Pick the type. If you are not sure, leave it on Code 128, which holds any text you can type.
  2. Type or paste what the barcode should say. For EAN-13, UPC-A and EAN-8, leave off the last digit and the page works it out.
  3. Choose a bar width and a height. Wider bars scan more easily, and every edge is drawn on a whole pixel so it stays sharp.
  4. Save a PNG for a document or a screen, or an SVG to print at any size without blur.

Which type should I pick?

  • Code 128 holds any letters, digits and symbols, and it is the smallest for a given text. Use it for shipping labels, stock, asset tags and anything with letters in it.
  • EAN-13 is the 13-digit code on products in most of the world, and on books, where it is the ISBN-13.
  • UPC-A is the 12-digit version used on products in the United States and Canada.
  • EAN-8 is a short 8-digit code for packs too small for an EAN-13.
  • Code 39 takes capitals, digits and a few symbols. It is older and wider than Code 128, and still common on badges and industrial labels.
  • ITF takes digits only, in pairs, and is used on cartons and cases.

Printing it so it scans

  • Keep the blank margin at both ends. It is part of the barcode, and this page adds the standard width.
  • Keep it dark bars on a light background. Scanners read contrast, so pale ink or a coloured background can make it unreadable.
  • Never stretch it in one direction only. Scale the whole image together, or save the SVG.
  • Print one, scan it with a phone, and only then print the rest.

Frequently asked questions

Will an EAN-13 or UPC-A from this page work in a shop?

It will scan, but a shop's system treats the number as a product identifier, and those numbers are issued by GS1, the standards body. This page draws whatever number you give it and does not reserve one for you. It is fine for your own stock, for events, for testing and for a book that already has its ISBN. Putting an invented number on something you sell can clash with another company's product.

What is the check digit?

The last digit of an EAN or UPC is arithmetic on the others. Counting from the right, the digits are multiplied by 3, 1, 3, 1 and so on and added up, and the check digit is what brings the total to the next multiple of ten. It lets a scanner notice a misread. If you type all the digits, this page checks yours and tells you the right one if it is wrong.

Can I make an ISBN barcode?

Yes. An ISBN-13 is an EAN-13 whose number starts with 978 or 979. Choose EAN-13 and type the first twelve digits. Hyphens and spaces are ignored, so you can paste the ISBN as it is printed.

How big should I print it?

As large as the space allows. At 300 dpi, a bar width of 4 pixels is about 0.34 mm, which is almost exactly the standard size for EAN and UPC. Smaller than that and cheap scanners start to struggle. SVG is the best choice for print, because it is sharp at every size.

Why does Code 128 come out shorter for numbers?

Code 128 has a mode that packs two digits into one symbol. This page switches into it whenever there is a run of digits and back out again when there is not, so a long number is about half the width it would be in the other types.

Why is my text refused?

Each type holds a different set of characters. Code 128 here holds standard keyboard characters, Code 39 holds capitals, digits, space and - . $ / + %, and the rest hold digits only. The message under the box names the first character it cannot use.

Is my text sent anywhere?

No. Everything happens in JavaScript inside your own browser. Nothing is uploaded and nothing is saved - close the tab and it is gone.

Related tools