If you need a barcode that encodes letters and numbers — not just a retail product number — you will almost certainly choose between Code 128 and Code 39. Both are free to use, both are widely supported, and both appear on shipping labels, asset tags and inventory systems. But they have different strengths.
Code 39: the rugged classic
Code 39 (also called Code 3 of 9) dates back to 1974. It encodes uppercase letters A–Z, digits 0–9 and a few symbols (- . $ / + % and space). Each character is built from nine elements — five bars and four spaces — of which three are wide, giving the symbology its name.
Its biggest advantage is robustness. Code 39 is self-checking and tolerates poor print quality, which made it the standard in manufacturing, defence (the LOGMARS standard) and harsh industrial environments. It can be printed with dot-matrix and impact printers and still scan.
Code 128: the dense modern workhorse
Code 128 encodes the full ASCII character set — uppercase and lowercase letters, digits, and most symbols. It achieves high density by switching between three code sets (A, B and C). Code set C encodes digit pairs in a single symbol character, doubling density for numeric data.
Code 128 includes a mandatory modulo-103 check character, making it more secure against misreads than standard Code 39. It is the default for shipping, logistics and internal tracking where data length and variety matter.
Head-to-head
| Feature | Code 39 | Code 128 |
|---|---|---|
| Character set | Uppercase + digits + 7 symbols | Full ASCII |
| Density | Lower (wider symbols) | Higher (compact) |
| Check digit | Optional / self-checking | Mandatory (mod 103) |
| Lowercase letters | Only via Extended variant | Native |
| Print tolerance | Excellent | Good |
| Typical use | Asset tags, defence, manufacturing | Shipping, logistics, SKUs |
Density matters more than you think
Because Code 39 is less dense, the same data produces a wider symbol. Encode a 12-character serial and Code 39 may be too wide for a small asset tag, while Code 128 fits comfortably. If label space is tight, Code 128 usually wins.
When to choose Code 39
- You need maximum print tolerance on rough surfaces or impact printers.
- You are working within a legacy system or standard that mandates Code 39 (e.g. LOGMARS).
- Your data is short, uppercase and alphanumeric.
- You want the simplest possible encoding (and easy font-based generation).
When to choose Code 128
- You need lowercase letters or a wide range of symbols.
- Label space is limited and you need a compact symbol.
- You want a mandatory check character for data integrity.
- You are building shipping or logistics labels (or GS1-128 for structured data).
What about Code 93?
Code 93 is a denser successor to Code 39 with the same character set plus two check characters. It is a good middle ground when you want Code 39's simplicity with better density and security, but Code 128 remains more universal.
The verdict
Choose Code 128 for most modern applications — it is denser, more capable and more secure. Choose Code 39 when print ruggedness, legacy compatibility or simplicity is the priority. BarcodeForge generates both instantly with correct check characters and crisp export.
Try it yourself — free, no signup
Generate any barcode or QR code mentioned in this guide, with correct check digits and print-ready export.