Barcode Generator — Code 128 & EAN-13, Free

Print-ready barcodes as PNG or SVG — Code 128 for anything, EAN-13 for retail.

🔒 Runs in your browser — files never uploaded ⚡ No signup 💯 Free

Generate scannable barcodes in the two formats that cover nearly every real need: Code 128 for arbitrary text — asset tags, serial numbers, tickets, internal SKUs — and EAN-13 for retail product numbers, with the check digit computed for you. Download as PNG for labels or SVG for print-perfect scaling.

Everything is generated in your browser, checksum arithmetic included.

How to use Barcode Generator

  1. Pick the type. Code 128 for text and codes of your own; EAN-13 for a 12-digit product number.
  2. Type the content. EAN-13's 13th digit — the checksum — is calculated automatically.
  3. Set bar width and height. Wider bars scan more reliably from further away.
  4. Download PNG or SVG. SVG scales losslessly for professional label printing.

Which barcode type do you need?

Code 128 is the general-purpose workhorse: full ASCII, compact, first-class support in every scanner. If you're labelling assets, shelves, tickets or boxes for your own systems, this is the one. (It even self-optimises here: digit-only content switches to the double-density numeric mode, halving the width.)

EAN-13 is the retail standard on nearly every product worldwide (UPC-A is its 12-digit US sibling). The crucial thing to know: the numbers themselves are assigned, not invented — to sell through real retailers you need a GS1-issued company prefix. Generating a barcode from a made-up number produces a perfectly scannable code that collides with someone else's product. For internal use, invent freely; for retail, license the number first.

The check digit, explained

EAN-13's last digit is arithmetic over the other twelve (alternating ×1/×3 weights, mod 10). Scanners verify it on every read — it's why a smudged barcode reads as nothing rather than as the wrong product. Enter 12 digits and it's computed; enter 13 and it's verified, with the correct digit suggested if yours is wrong.

Printing barcodes that actually scan

  • Quiet zones are load-bearing — the white margins are part of the symbol; this generator includes them, so don't crop.
  • Black on white. Scanners read contrast; designer grey-on-beige labels fail in proportion to their subtlety.
  • Prefer SVG for print — PNG bars can land between printer dots at small sizes; vectors can't.
  • Never stretch horizontally after the fact: bar ratios are the data.

Frequently asked questions

Can I sell products with a barcode I generated here?

The barcode, yes — the number, no. Retail EAN/UPC numbers are assigned by GS1; a made-up number scans perfectly but collides with someone else's registered product, and retailers will reject it. Get a GS1 prefix, then generate the barcode for the numbers they assign you. Internal-use numbering (your own warehouse, your own shop) is yours to invent freely.

Code 128 or EAN-13 — which should I use?

EAN-13 only for retail product numbers — that's its whole job. Everything else (asset tags, tickets, serials, URLs-as-text, member IDs) wants Code 128: it encodes any ASCII text, more compactly, and every scanner reads it.

What is the check digit and why is it computed for me?

EAN-13's last digit is arithmetic over the other twelve — scanners verify it on every read, so a misprinted digit makes the code unreadable rather than silently wrong. Enter 12 digits and it's appended; enter 13 and it's verified, with the correct value shown if yours doesn't match.

Why is there so much white space around the bars?

Quiet zones — required margin that tells the scanner where the symbol starts and ends. They are part of the barcode, not decoration. Cropping them is the most common reason a printed barcode won't scan.

PNG or SVG for printing labels?

SVG whenever your label software accepts it: vectors print bars at exact positions at any size. PNG is fine at generous sizes, but shrunk raster bars can land between printer dots and blur — and blurred bar edges are exactly what scanners can't read.