Skip to content

Free barcode generator

Eleven barcode symbologies plus QR, rendered in your browser, exported as PNG or vector SVG. Free, with no sign-up, no watermark and no limit on how many you make — and nothing you type is uploaded anywhere.

Generate a barcode

#000000
#ffffff

SVG shape mask (decorative)

Upload an SVG — the barcode is clipped to its shape. A horse SVG makes a horse-shaped barcode.

Live preview

Which barcode format should you use?

Nearly every barcode question comes down to one decision: is this symbol going to be scanned at a retail till, or somewhere you control? If it is retail, you need an EAN or UPC number allocated to you by GS1; a generator cannot give you one, and a made-up number will be rejected or will collide with someone else's product.

For everything else — warehouse shelves, asset tags, event tickets, library stock, a label on a box you are posting — pick Code 128. It takes any ASCII text, packs digits efficiently, and needs no registration. Reach for a 2D format instead when you have more data than a line of bars can carry: Data Matrix when the label is tiny, PDF417 when you need a paragraph of text, and Aztec when the code has to work with no margin around it, such as on a phone screen at a ticket barrier.

To encode a web address, use a QR code rather than a linear barcode. Linear symbologies were designed for short identifiers, and a full URL in Code 128 produces a symbol so wide that most scanners struggle. Barcode or QR code explains what moving from one to the other involves.

Turning a number into a barcode

Type the number into the data field, choose a format and download the symbol. A barcode is only a drawing of the characters you give it — the generator looks nothing up and allocates nothing — so the right format follows from what the number is:

  • A 13-digit product number is an EAN-13 barcode; type the first 12 digits and the check digit is added.
  • A 12-digit UPC is a UPC-A barcode, and its compressed eight-digit form is a UPC-E barcode.
  • An 8-digit retail number for a small pack is an EAN-8 barcode.
  • A 14-digit case number (GTIN-14) belongs in an ITF-14 barcode.
  • Any other number — an order, invoice, serial or asset number — goes into a Code 128 barcode, which packs digits two per character. A closed numeric system with even-length numbers can also use Interleaved 2 of 5.

To print the bars without the number underneath, untick Print the human-readable text under the symbol. Keep the digits on EAN and UPC symbols for retail packaging: the GS1 specifications require them, and a till operator types them when a scan fails.

Which barcodes accept letters?

Only some symbologies are alphanumeric. The retail and carton formats carry digits and nothing else, so a letter in the data field produces an error rather than a barcode.

  • Code 128: upper and lower case, digits, punctuation and control characters — all of ASCII. Accented letters are outside the standard character set, and most scanners reject or garble them.
  • Code 39: upper case A–Z, digits, space and the symbols - . $ / + %.
  • Data Matrix, PDF417 and Aztec: any text, including accented letters, and binary data.
  • Digits only: EAN-13, EAN-8, UPC-A, UPC-E, ITF-14 and Interleaved 2 of 5.

The supported symbologies

Each format has its own page covering its character set, length rules, check digit, real uses and a generator preset to it.

Code 128

code128

Type anything printable and get a scannable Code 128 symbol. This is the format to pick whenever the barcode is for your own system rather than a retail till.

Accepts — All 128 ASCII characters, via code sets A, B and C · Variable — no limit in the standard, bounded in practice by label width

Code 39

code39

The oldest alphanumeric barcode still in daily use. Wider than Code 128 for the same data, but demanded by name in defence, automotive and a lot of older badge systems.

Accepts — 0–9, A–Z, space, and - . $ / + % · Variable

EAN-13

ean13

The 13-digit retail barcode used on packaged goods outside North America. Type your 12-digit article number and the thirteenth digit is computed automatically.

Accepts — Digits 0–9 only · 12 digits (check digit computed) or a complete 13

EAN-8

ean8

The short retail barcode, for packaging that physically cannot carry a full EAN-13. Eight digits, check digit calculated as you type.

Accepts — Digits 0–9 only · 7 digits (check digit computed) or a complete 8

UPC-A

upca

The 12-digit UPC barcode used in US and Canadian retail. Enter eleven digits and the twelfth is calculated for you.

Accepts — Digits 0–9 only · 11 digits (check digit computed) or a complete 12

UPC-E

upce

The compressed form of UPC-A for packaging that has no room for twelve digits. Eight printed digits that a scanner expands back to a full UPC-A.

Accepts — Digits 0–9 only · 7 digits (check digit computed) or a complete 8

ITF-14

itf14

The barcode on the outside of a shipping case. Fourteen digits, printed with bearer bars so it survives being printed straight onto corrugated cardboard.

Accepts — Digits 0–9 only · 13 digits (check digit computed) or a complete 14

Interleaved 2 of 5

interleaved2of5

A dense numeric-only symbology that encodes two digits in the space most formats give one. The basis for ITF-14, and still common on cartons and film.

Accepts — Digits 0–9 only · Variable, but always an even number of digits

Data Matrix

datamatrix

The square 2D matrix code that still reads when it is only a few millimetres across. Standard for marking components, instruments and pharmaceutical packs.

Accepts — Full byte range; ASCII, Latin-1 and raw binary · Up to 2,335 alphanumeric characters, 3,116 digits or 1,556 bytes

PDF417

pdf417

The stacked barcode that carries a paragraph rather than an identifier. If you have scanned the strip on a boarding pass or the back of a driving licence, you have scanned PDF417.

Accepts — Text, numeric and byte compaction modes; full binary supported · Up to 1,850 text characters, 2,710 digits or 1,108 bytes

Aztec Code

azteccode

The ticketing 2D code. It needs no blank margin around it, which is why it survives being printed at the very edge of a rail ticket or shown on a phone at a gate.

Accepts — Full byte range; text and binary · Up to 3,832 digits, 3,067 letters or 1,914 bytes

QR Code (bwip-js renderer)

qrcode

Available in the Barcode tab for completeness. For colours, a logo overlay, UTM tagging or SVG export, use the dedicated QR code generator on the home page instead.

Accepts — Any text or URL

Why your barcode shows an error

Unlike a QR code, a linear barcode cannot encode arbitrary data in an arbitrary format. Each symbology enforces a length and a character set, and bwip-js refuses to render something invalid rather than producing a symbol that will not scan. Almost every error message comes from one of these:

  • A retail format given the wrong number of digits. EAN-13 wants 12 or 13, UPC-A 11 or 12, EAN-8 7 or 8.
  • Letters in a numeric-only format. EAN, UPC, ITF-14 and Interleaved 2 of 5 accept digits only.
  • An odd number of digits in Interleaved 2 of 5, which encodes digits in pairs.
  • Lowercase letters in Code 39, which only knows uppercase.
  • A check digit you typed yourself that does not match the one the standard computes. Leave it off and let the generator calculate it.

Printing a barcode that actually scans

Export SVG whenever the barcode will be printed. The SVG download is a true vector file — every bar and every digit is a path, not an embedded picture — so it keeps its edges crisp at any size in Illustrator, InDesign, Inkscape or label software, while a PNG scaled up in a layout program produces soft edges that cheap laser scanners misread. The one exception is a symbol with a shape mask, which is exported as an image inside the SVG.

Contrast matters more than colour. Scanners threshold the image, so the bars need to be dark and the background light; black on white is safest, and reversed (light on dark) bars fail on many readers. Avoid red or orange bars in particular: most laser scanners use red light, under which red ink looks as pale as the paper.

Leave the quiet zone alone — the blank margin on each side of the symbol is part of the symbology, not decoration, and cropping it is the single most frequent reason a correctly generated barcode will not scan. Do not stretch the symbol horizontally either; narrowing the bars below the printer's resolution destroys it.

Finally, the SVG shape mask option is artwork only. Clipping the bars into a silhouette removes part of the encoded data, so a masked barcode is not readable by design. It looks excellent on a poster and it will never work at a till.

Guides

Longer reads on getting a symbol that scans off a real printer, and on the numbering rules behind the retail formats.

All QR code and barcode guides →

Need a QR code instead?