Code 128 barcode generator
The workhorse of logistics and internal stock control. Encodes the full ASCII set, any length, at high density — and needs no licence from anybody.
EAN-13 — enter 12 digits and the check digit is calculated for you, or paste all 13.
Loading barcode engine…
Free, unlimited, no account required. Nothing you type is sent to our servers — the barcode is drawn in your browser.
Why Code 128 is the default choice
If you are tracking something for your own purposes rather than selling it through a retailer, Code 128 is almost always the right answer.
- Full ASCII — letters, digits, punctuation. Your existing SKU scheme works as-is.
- Variable length — no fixed digit count to design around.
- High density — noticeably narrower than Code 39 for the same data.
- No licence — unlike EAN and UPC, nothing needs registering with GS1.
- Universally supported — every scanner made in the last thirty years reads it.
Subsets A, B and C
Code 128 has three encoding modes, and a good encoder switches between them automatically to keep the symbol short.
| Subset | Encodes | Used when |
|---|---|---|
| A | Uppercase, digits, control characters | Legacy systems needing control codes |
| B | Upper and lowercase, digits, punctuation | General-purpose text |
| C | Digit pairs (two digits per symbol) | Long numeric strings — roughly half the width |
You do not need to choose. The generator above switches subsets automatically, so a numeric run gets encoded in subset C and drops to about half the width it would otherwise need.
GS1-128 is a different thing
GS1-128 (previously UCC/EAN-128) uses the Code 128 symbology but adds a strict data structure: each field is prefixed with an application identifier so any compliant scanner knows what it is reading.
| AI | Field |
|---|---|
| (00) | SSCC — pallet or shipment serial |
| (01) | GTIN |
| (10) | Batch or lot number |
| (15) | Best-before date |
| (17) | Expiry date |
| (3103) | Net weight in kilograms |
This page produces plain Code 128, which is what internal tracking needs. If a trading partner has asked for GS1-128 with application identifiers, that structure has to be encoded correctly to be accepted — worth confirming their exact spec before printing.
Practical use
- Warehouse and stock — bin locations, pick lists, stocktakes.
- Shipping labels — carrier tracking numbers are overwhelmingly Code 128.
- Asset tags — equipment IDs that need letters as well as digits.
- Work orders — job numbers scanned through a production line.
- Amazon FNSKU — Amazon's per-unit labels are Code 128. See the Amazon page.
For asset tags that take physical abuse, consider Data Matrix instead — it recovers from around 30% damage, where a linear barcode with a scratch across it simply fails.
Frequently Asked Questions
Do I need a licence to use Code 128?
No. Unlike EAN and UPC, Code 128 carries whatever value you choose and needs no GS1 registration. That is why it is the standard choice for internal use.
What is the maximum length?
There is no hard limit in the specification, but the symbol gets wider with every character. Beyond roughly 20–25 characters it becomes impractical to print and scan reliably — use a 2D code such as Data Matrix instead.
What is the difference between Code 128 and GS1-128?
Same symbology, different rules. GS1-128 requires data to be structured with application identifiers so scanners can parse fields such as batch and expiry. Plain Code 128 encodes free-form data.
Can Code 128 encode lowercase letters?
Yes, via subset B. Code 39 cannot, which is one of the main reasons Code 128 replaced it for most applications.
Which is better, Code 128 or Code 39?
Code 128 in almost every case — significantly denser, supports lowercase, and encodes the full ASCII set. Code 39 persists mainly where an existing system or standard mandates it.
Tracking assets as well as stock?
Code 128 identifies the item. A dynamic QR code on the same label can open its maintenance record, manual or service history — and be repointed when your systems change.
7-day free trial, no credit card. Code 128 stays free forever.