Code 128 Barcode Generator

Create a Code 128 barcode from letters, digits and symbols. Set scale and bar height, download PNG or SVG with a proper quiet zone. Free, runs in your browser.

Code 128

Any ASCII characters. Variable length. Most versatile barcode format.

How it works

Type the text or number to encode and generate. Code 128 stores letters, digits, spaces and keyboard symbols in a compact barcode, which is why it is common on internal labels: asset tags, bin and shelf locations, order and shipment references. The check character is calculated and added for you. Everything runs in your browser.

Tips

Keep the value short: every character adds width, and long codes are hard to scan on small labels. Runs of digits pack about twice as tightly as letters. Leave Show text on to print the readable value under the bars, so people can type it if a scan fails.

Examples

Valid: shelf location

A-12-03

Letters, digits and dashes are fine. A scanner returns exactly A-12-03.

Valid: order number

20261017

An all-digit value uses the compact numeric mode, so this barcode is narrower than eight letters would be.

Fails: accented letter

Café-01

é is not printable ASCII. The generator names the character so you can replace it, for example Cafe-01.

Wrong format: retail product

012345678905

Code 128 would encode it, but shops scan UPC-A or EAN-13 on products for sale. Use the full barcode generator for those formats, with a number licensed from GS1.

What this generator encodes

Printable ASCII: A-Z, a-z, 0-9, space and keyboard symbols such as - . / # $ %. Accented letters, emoji and other characters are refused with a message that names them. Length is not fixed, but width grows with every character. GS1-128 (application identifiers for supply-chain data) is not supported here.

Check character

Every Code 128 barcode ends with a check character (modulo 103) before the stop pattern. The generator computes it; you never type it, and scanners use it to verify the read and do not return it.

When to use another standard

Products sold in shops need UPC-A (North America) or EAN-13 with a GS1-issued number. Shipping cartons often carry ITF-14. Code 39 is upper case only but still required by some older systems. All of these are in the full barcode generator.

Printing and sizing

Download SVG for print. Keep the white margin on both sides: the generator adds a quiet zone of 10 narrow-bar widths, the minimum Code 128 needs, so do not crop it or place text inside it. Print black bars on white. Resize proportionally or change Scale here; never stretch the image horizontally in another program. Test the printed label with the scanner that will read it.

Want to learn more? Read our guide: Barcode Generator Guide

Frequently Asked Questions

Is Code 128 free to use?

Yes. The symbology is an open standard, so you can print Code 128 barcodes for your own labels without a license. Only numbering systems run by GS1, such as UPC and EAN, need a GS1 company prefix.

Can Code 128 store lowercase letters?

Yes. Code 128 covers upper and lower case letters, digits, spaces and symbols, unlike Code 39, which is upper case only.

Why is my barcode so wide?

Every character adds width. Shorten the value, use digits where you can, or lower Scale, and keep the quiet zones when you place it on a label.

Can I use Code 128 on products sold in stores?

Usually not. Retailers scan UPC-A or EAN-13 carrying a GS1-issued number. Code 128 is for internal labels, logistics and tracking.
Try Barcode Generator Free

No signup required. Runs in your browser – the file is never uploaded.

Advertisement