TFT

Free Barcode Generator

Create custom barcodes and QR codes instantly online. No software download required. Supports all major 1D and 2D formats for labels, packaging, and digital use.

2
20px

Enter valid data to generate your Code 128

Quick Examples

How it works

Type in text or numbers, pick a barcode format, and download a PNG. The generator uses the BWIP-JS library (Barcode Writer in Pure JavaScript) to create barcode images that follow the encoding rules for each format. Code 128 supports full ASCII, EAN-13 and UPC-A are numeric only, and QR Code can hold URLs and thousands of characters.

The tool validates your input against the format's rules. EAN-13 needs 12 or 13 digits, for example, and the check digit is calculated automatically. If the data doesn't match the format, you'll get an error message instead of a broken barcode. The output is a PNG image at 300 DPI, which is fine for both screen and print use.

One thing that trips people up: you can type any number into this generator and it will make a barcode out of it. But for retail products, you need official GS1 barcode numbers. Using unregistered numbers on products can get your items rejected by retailers. For internal use like inventory tags or asset labels, any number works fine.

When this is useful

A small business owner setting up products for Etsy or a local store needs barcodes for labels. A warehouse manager needs Code 128 barcodes for bin locations. Someone putting together a conference needs QR codes on attendee badges. Each of these calls for a different format, and the generator handles them all in one place.

The tool is less useful when you need hundreds of barcodes at once. In that case, the bulk barcode generator accepts a CSV file and processes them in batch. Or if you need barcodes directly in a Word document, the font encoder produces text strings for barcode fonts instead of images.

What to watch out for

Barcode size matters for scanning. A 1D barcode printed below 26mm width (about 1 inch) may not scan reliably. Print resolution should be at least 300 DPI. Laser printers produce sharper barcodes than inkjet. The quiet zone (blank space on both sides of the barcode) needs to be present too. Missing quiet zones are a common reason barcodes fail to scan.

Colors are black on white by default. Colored barcodes can work if there's enough contrast, but avoid red for the bars since many scanners use red lasers that can't see red ink. If you need inverted or colored barcodes for a specific design, use the color inverter tool instead.

Common questions

What's the difference between 1D and 2D barcodes?

1D barcodes store data in horizontal bars and spaces, usually 20-25 characters. 2D barcodes like QR Code and Data Matrix use both horizontal and vertical patterns and can hold thousands of characters, including URLs and binary data.

Can I use generated barcodes on real products?

For retail, you need GS1-issued barcode numbers. The generator makes technically valid barcodes from whatever number you give it, but retailers and supply chain systems expect registered numbers. For internal tracking, asset management, or any use where you control the scanning system, generated barcodes work perfectly.

What file format do I get?

PNG images at 300 DPI. PNG uses lossless compression, which keeps the sharp edges necessary for reliable scanning. If you need a different format, use an image converter.

How big should the barcode be?

For handheld scanners at close range, 26mm minimum width works. Conveyor scanning or longer distances need larger sizes. Always test-scan a printed sample before committing to a run.

Does this tool generate SVG vector barcodes?

No, the output is PNG raster images. For vector barcodes, use the PDF export tool which generates scalable barcodes in PDF format suitable for label printing.

Are QR codes always better than 1D barcodes?

Not necessarily. QR codes hold more data and work with smartphones, which makes them good for consumer-facing uses. 1D barcodes scan faster in high-volume retail and warehouse environments. Pick based on your equipment and use case.