Code 128 Barcode Generator
Encode text and numbers in a dense Code 128 barcode.
What is Code 128?
Code 128 is a compact, high-density barcode that encodes digits, upper- and lower-case letters and common ASCII symbols. It's widely used in shipping, logistics and warehouse labels.
How to create one
Type any text or number. The generator selects the optimal Code Set (A, B or C) automatically to keep the barcode as short as possible, and shows a live preview. Download PNG or SVG, or print directly.
How it works
Code 128 packs data efficiently and includes its own checksum internally, so it's reliable even for longer strings. Numeric-only data compresses especially well using Code Set C.
Where to use it
Shipping labels, asset tags, batch and lot numbers, and internal inventory systems all rely on Code 128 for its density and flexibility.
Scanning and printing tips
Longer data makes a wider barcode — give it room and don't compress horizontally. Keep bars crisp and high-contrast, and test with your target scanner.
Limitations
Code 128 encodes standard ASCII only. Extremely long strings create very wide barcodes that may not fit your label.
Frequently asked questions
What characters does Code 128 support?
Digits, upper and lower-case letters, and standard ASCII symbols. The Code Set is chosen automatically.
Is it good for numbers?
Yes — numeric data compresses very efficiently using Code Set C, producing short barcodes.
Does it need a check digit from me?
No. Code 128 includes its own checksum internally.
Curious how we build and check these codes? Read our methodology.