Barcode Generator

Create scannable Code 128 and EAN-13 barcodes with correct check digits, as PNG or SVG.

Generate Real, Scannable Barcodes

A barcode is not a picture of some stripes — it is a precisely specified encoding with checksums, quiet zones and fixed module widths. Get any of that wrong and scanners simply refuse to read it, which is how a surprising number of "barcode generators" produce images that look right and scan not at all.

Both symbologies here are implemented from their specifications, including the Code 128 modulo-103 check character and the EAN-13 check digit. Enter twelve digits and the thirteenth is calculated for you; enter thirteen and a wrong check digit is reported rather than silently encoded.

Key features

  • Code 128 set B — letters, digits and punctuation, with the modulo-103 checksum computed correctly.
  • EAN-13 with check digit — supply twelve digits and the check digit is added; supply thirteen and it is verified.
  • Quiet zones included — the blank margins scanners need, which is the most common reason a home-made barcode fails.
  • PNG and SVG export — vector output stays razor sharp at any print size, which matters for labels.
  • Human-readable value — printed beneath the bars, as retail barcodes require.
100% client-side — no data leaves your machine

This tool runs entirely inside your browser using native Web APIs. Your files and text are never uploaded to a server, never logged and never shared with third parties.

How to use: Barcode Generator

  1. Pick the symbology
    Code 128 for internal codes, asset tags and shipping references; EAN-13 for retail products.
  2. Enter your data
    Code 128 accepts printable ASCII. EAN-13 takes 12 or 13 digits and tells you the correct check digit either way.
  3. Set the size
    Bar width and height affect scan reliability — wider bars scan more easily, especially on low-quality printers.
  4. Export PNG or SVG
    Use SVG for anything that will be printed. Raster barcodes blur when scaled and blurred bars do not scan.

Technical specifications

Processing locationEntirely in your browser — no server round trip
Data uploadedNone. Files and text never leave your device
PriceFree — no account, no trial, no usage cap
CategoryMedia
Works offlineYes, once the page has loaded
Browser supportChrome 90+, Edge 90+, Firefox 90+, Safari 15+
Interface languagesEnglish, 中文, हिन्दी, Español, العربية

Frequently asked questions

Will these barcodes actually scan?

Yes, provided you print them at adequate size with the quiet zones intact. They are generated from the published specifications with correct check characters. Test with a phone scanner before committing to a print run.

Can I use an EAN-13 I made up for a real product?

No. Retail EAN numbers are allocated by GS1, and a number you invent may already belong to someone else. This tool generates the symbol; the right to a specific number comes from GS1.

Why does my check digit get rejected?

Because it does not match the first twelve digits. The check digit is calculated from them by a fixed formula — the tool shows you what it should be so you can correct the source data.

Should I choose PNG or SVG?

SVG for print, every time: it stays sharp at any size. PNG is fine for screens and quick tests.

Related tools

Back to all tools