Barcode Generator

Generate EAN-13, Code-128 and other barcodes from any value.

Barcode Options

Barcode Preview

About the Barcode Generator

The Barcode Generator turns a number or string into a scannable barcode. Choose the format, set the width and height, and the preview updates; you can then download it as an SVG.

The format has to match the data. EAN-13 and UPC-A are fixed-length retail codes with a check digit, so they accept twelve or thirteen digits and nothing else. Code 128 is the flexible one: it encodes arbitrary text and is what you use for inventory labels, serial numbers and internal IDs.

The barcode is drawn by a small JavaScript library loaded from a public CDN, so the page needs a working connection the first time it runs. Printing at a sensible size matters too: below about 2 cm wide, phone scanners start to struggle.

Common questions about Barcode Generator

Which format should I use?

Code 128 for general text and internal labels. EAN-13 for retail products that need a standard barcode.

Why does EAN-13 reject my number?

EAN-13 is fixed length: it expects twelve digits plus a check digit, or thirteen including it. Use Code 128 for other lengths.

Can I encode letters?

Yes, with Code 128. EAN and UPC formats are numeric only.

How big should I print it?

At least 2 to 3 cm wide for reliable phone scanning, with quiet space on both sides.

Can I download the barcode?

Yes, as an SVG, which stays sharp at any print size.

Does it need an internet connection?

The barcode library is fetched from a CDN on first use, so yes for the initial load.

Related Tools in Everyday Utilities

Password GeneratorQR Code GeneratorRandom Number Generator