Barcode Generator — CODE128, EAN-13 and More

Create a scannable barcode in eight formats — CODE128, CODE39, EAN-13, EAN-8, UPC-A, ITF-14, MSI and Pharmacode — and download it as a PNG for printing or an SVG for artwork that scales without blurring. Set the bar width, height, font size and colours, and watch the preview redraw as you change them. Each format has its own rules about length and allowed characters, and the tool tells you what is wrong rather than silently producing a barcode that no scanner will read. There is also a bulk mode: paste a list of codes, generate them all, and take the lot as a ZIP.

Barcode Generator

Rendered on a canvas here. Nothing is uploaded.

2
100
20
10

Preview

Runs fully in your browser. Nothing is uploaded.

How to Use the Barcode Generator

  1. Type or paste the value you want encoded. For a retail product that is the GTIN printed on the packaging.
  2. Pick the format. CODE128 accepts any length of letters and numbers and is the right default when the barcode is for your own internal use.
  3. Adjust bar width and height. For printing, keep bar width at 2 or higher — thin bars at low print resolution are the commonest cause of a barcode that will not scan.
  4. Leave the quiet zone at 10 or more. That blank margin either side is part of the barcode, and scanners fail without it.
  5. Download a PNG for documents and labels, or an SVG when the barcode goes into print artwork and must scale cleanly.
  6. For a batch, open Bulk generate, paste one value per line, and download the whole set as a ZIP.

Features

  • Eight formats covering retail, logistics, warehousing and pharmaceutical packaging.
  • Live validation that explains each format's length and character rules before you print.
  • Full control of bar width, height, quiet zone, font size and both colours.
  • PNG for everyday use and true vector SVG for print artwork.
  • Bulk generation of up to 300 barcodes, downloaded as one ZIP with each value as its filename.
  • Everything rendered in the browser, so product codes and SKUs are never uploaded.

About This Tool

Picking the right format matters more than any styling choice. CODE128 encodes the full ASCII set at any length and is the sensible default for internal use: asset tags, job numbers, shelf labels, event passes. CODE39 is older and less dense but is still specified by some government and automotive systems. EAN-13, EAN-8 and UPC-A are retail formats, and they encode a number issued to you by GS1 — you cannot invent one and expect a shop's till to accept it. ITF-14 goes on outer shipping cartons, MSI on warehouse shelf edges, and Pharmacode on medicine packaging, where it is read at high speed on a production line.

Retail formats also carry a check digit, a final number calculated from the preceding digits. Enter twelve digits for an EAN-13 and the thirteenth is computed for you; enter thirteen and it is verified. If the check digit does not match, the barcode is rejected rather than drawn, because a mis-keyed digit that still scans is worse than one that does not scan at all.

Most barcodes that fail in the real world fail for printing reasons rather than encoding ones. Bars printed too thin for the printer's resolution blur into each other. The quiet zone, the plain margin on either side, gets cropped by a label template. Colours are inverted, which scanners cannot read, or the contrast between bars and background is too low. Keep bars dark on a light background, leave the margin alone, and test-scan one printed label with a phone before running five hundred.

Choose SVG whenever the barcode is going into print artwork. A vector barcode has mathematically exact bar widths at any size, while a PNG enlarged for a large label starts showing soft edges, which is exactly what a scanner struggles with.

Frequently Asked Questions

Which barcode format should I use?

CODE128 for anything internal — asset tags, SKUs, job cards — because it takes letters and numbers at any length. EAN-13 or UPC-A only if you are selling through retail and have a GS1 number. ITF-14 for shipping cartons.

Can I make my own EAN-13 number?

Not for retail sale. EAN and UPC numbers are issued by GS1 against a company prefix, and inventing one risks clashing with a real product in a retailer's system. For internal tracking, use CODE128 instead, which has no registry at all.

What is a check digit?

A final digit calculated from the ones before it, so a scanner can detect a misread. Retail formats require one. Enter twelve digits for EAN-13 and this tool calculates the thirteenth; enter all thirteen and it verifies yours and refuses if it is wrong.

Why will my printed barcode not scan?

Usually the bars are too thin for your printer, the quiet zone has been cropped by a label template, or the contrast is too low. Raise the bar width to 3 or 4, keep the quiet zone at 10 or more, use dark bars on a light background, and test one label before printing a batch.

PNG or SVG?

SVG for anything going into print artwork, because it stays mathematically exact at any size. PNG for documents, spreadsheets and quick labels where a fixed resolution is fine.

Related Tools

Favicon Generator

Generate every favicon size from one image and copy the HTML tags.

Open Favicon Generator

Rent Receipt Generator

Generate monthly rent receipts for HRA and download one combined PDF.

Open Rent Receipt Generator

Hash Generator

Hash text or files with MD5 and SHA, then compare against a checksum.

Open Hash Generator

Browse all 20 tools →