Code 128 barcodes, explained
The workhorse barcode behind shipping labels, inventory tags, and tickets. Here is what it stores, why it is reliable, and when to reach for it instead of a QR code.
Code 128 is a one-dimensional (linear) barcode: a single row of bars and spaces read left to right by a laser or camera scanner. It earned its name because it can encode all 128 ASCII characters. That makes it far more flexible than older numeric-only symbologies, while staying compact and dependable.
What it can store
- Letters and digits: uppercase and lowercase A to Z, 0 to 9.
- Symbols: common punctuation and control characters across the ASCII set.
- Density: a special numeric mode packs pairs of digits tightly, so long numeric codes stay short.
It does not store links, images, or long paragraphs. For a website, contact card, or Wi-Fi details, use a QR code instead.
Why it is reliable
Every Code 128 barcode carries a hidden check digit, a value calculated from the other characters. The scanner recomputes it and refuses the read if it does not match, which prevents a smudge or a misread from returning the wrong data. The symbology also uses three code sets (A, B, and C) that a good encoder switches between automatically to keep the bars as short as possible.
Code 128 vs QR code
| Code 128 | QR code | |
|---|---|---|
| Shape | One row of bars | Square grid |
| Best for | Short IDs, SKUs, tracking numbers | Links, text, contacts, Wi-Fi |
| Capacity | Small, a short string | Large, thousands of characters |
| Scan angle | Roughly aligned, left to right | Any orientation |
| Reads with | Laser scanners and cameras | Phone cameras |
Where you will see it
- Shipping and logistics: carrier labels and tracking numbers.
- Retail and warehouse: internal SKUs, bin locations, and stock counts.
- Events: ticket and wristband IDs scanned at the door.
- Manufacturing: part numbers and batch codes on components.
How to make one that scans
- Open the generator and switch to barcode mode.
- Type the value: a SKU, an order number, or any short ASCII string. The tool warns you if a character cannot be encoded.
- Keep it short. Long strings make a wide barcode that is harder to scan.
- Download and print with dark bars on a light background, and leave clear space (a quiet zone) at both ends.
Common mistakes
- Non-ASCII characters. Accented letters and emoji cannot go in Code 128; stick to plain ASCII.
- Printing too small. Bars that blur together will not scan; give the barcode room.
- No quiet zone. Bars need blank margins on the left and right so the scanner finds the start and stop patterns.
- Low contrast. Light bars on a dark or busy background defeat most scanners.
Generate a Code 128 barcode now, or read the FAQ for more.