Skip to content
PocketDesk
Your files are processed on your device, never uploaded

Barcode generator

  • On device
Loading tool…

How to make a barcode

  1. Choose a format: Code 128, EAN-13, UPC-A or Code 39.
  2. Type your value. A hint under the box shows what the format accepts, and errors appear straight away.
  3. Adjust the bar width or hide the number if you like, then select Download PNG or Download SVG.

Which format to use

  • Code 128 holds any ASCII text and packs it densely. It is the usual choice for shipping labels, inventory and asset tags.
  • EAN-13 is the 13 digit code on retail products around the world.
  • UPC-A is the 12 digit retail code used mainly in the United States and Canada.
  • Code 39 holds capital letters, digits and a few symbols. It is simple and old, and is common on ID cards and in warehouses.

Test the format with your scanner before you print many labels. Some scanners are set up to read only certain types.

How check digits work

EAN-13 and UPC-A end with a check digit. To find it, the other digits are weighted alternately by 3 and 1 (counting from the right), added up, and the digit that brings the total to a multiple of 10 is the check digit. A wrong digit makes scanners reject the barcode.

If you enter 12 digits for EAN-13 (or 11 for UPC-A), the tool adds the check digit and tells you which one it used. If you enter a full number with the wrong last digit, it shows an error with the correct digit so you can spot the typo.

Tips

  • Keep the white margins (quiet zones) on each side. Without them a scanner cannot find the start of the code.
  • Print black bars on a white background at 100 percent scale or larger, with sharp edges.
  • Do not stretch an image. Resizing a PNG blurs the bars, so use SVG when you need a different size, or the image resizer with care.
  • For links and longer text, a two-dimensional code is better. Make one with the QR code generator and check it with the QR code reader.
  • Choose colours with high contrast. The color converter checks contrast ratios.

The barcode is created locally, so your numbers never leave your device.

Questions

Which barcode types are supported?

Code 128, EAN-13, UPC-A and Code 39. Code 128 is the most flexible, EAN-13 and UPC-A are the retail product standards, and Code 39 is common in industry and ID labels.

What is a check digit?

The last digit of an EAN-13 or UPC-A number, calculated from the others, so scanners can detect typing mistakes. This tool adds it for you or tells you if yours is wrong.

Can I use these barcodes on products I sell?

The barcodes scan correctly, but retail numbers must be licensed from GS1 so they are unique worldwide. Never use a number you did not get from GS1 or your supplier.

SVG or PNG?

Use SVG for print and design work, because it stays sharp at any size. Use PNG for documents and websites.

Is my data uploaded?

No. The barcode is drawn in your browser.

More developer tools