TanodTools

Barcode generator

Choose a barcode format, type the number or text, and download the barcode as SVG or PNG. Check digits are calculated for you.

Runs entirely in your browser

Text

Barcodes are drawn with the JsBarcode library. The tool checks the digits and check digit but cannot tell whether a number is registered to you; real EAN and UPC product codes come from GS1.

How to make a barcode

  1. Pick the format your scanner or retailer asks for. If you are unsure and the content is ordinary text or numbers, Code 128 is the usual choice.
  2. Type the value. For EAN-13, EAN-8, UPC-A and ITF-14, leave the check digit off and it is added, or type it and it is verified.
  3. Adjust bar width, height and colours if needed, then download the barcode as SVG or PNG.

How linear barcodes encode data

A linear barcode is a row of bars and spaces whose widths stand for characters. EAN-13 and UPC-A are fixed-length numeric codes for retail products: twelve digits for EAN-13 or eleven for UPC-A identify the product, and a final check digit protects against misreads. Code 128 is the flexible one, encoding any ASCII character by switching between character sets, which makes it dense and the default for shipping labels and internal asset tags.

The check digit for the GS1 family (EAN, UPC and ITF-14) is a weighted sum. Starting from the rightmost data digit, the digits are weighted 3, 1, 3, 1 and so on, and the check digit tops the sum up to the next multiple of 10. UPC-E is a compressed form of UPC-A, so its check digit is calculated on the expanded twelve-digit number. This tool computes all of these and refuses a number whose check digit does not match, rather than printing a code that would fail.

Print size matters more than format. Scanners need a quiet zone of blank space on both sides, which is the margin setting here, and bars that are not too thin for your printer. A bar width of 2 pixels at 300 dots per inch is far finer than at screen resolution, so test a printed sample before a full run.

Tips

Questions

What is a check digit?

The last digit of an EAN, UPC or ITF-14 number is calculated from the others, so a scanner can catch a typo. Each digit counting from the right is multiplied by 3 and 1 alternately, the products are added, and the check digit is whatever brings the total up to a multiple of 10.

What happens if I type the wrong check digit?

The tool does not quietly change it. It shows what the check digit should be and does not draw a barcode until you correct the number or delete the last digit so it can be calculated.

Can I use these for products I sell in shops?

Retail systems expect numbers allocated to you by GS1 or your national GS1 office. This tool draws any valid number, but a number you invented may clash with someone else's product. Use it for internal labels, tests and artwork.

Code 39 has no lowercase letters. What happens to them?

Lowercase letters are converted to capitals and the tool says so. Code 39 can encode digits, capital letters, space and the symbols - . $ / + %; anything else is reported instead of being dropped.

Which format fits which job?

Code 128 packs any ASCII text compactly. EAN-13 and EAN-8 are for retail products worldwide, UPC-A and UPC-E for North American retail. ITF-14 labels shipping cartons, Code 39 and Codabar appear in logistics, libraries and blood banks, and Pharmacode is used in pharmaceutical packing.

Should I download SVG or PNG?

Use SVG for print or anything that must stay sharp at any size. Use PNG for documents and web pages that need a bitmap; choose a larger scale to avoid soft edges when the image is enlarged.