Code 128 vs Code 39: Which Barcode Format to Choose
The two most common label barcodes look similar but behave very differently. Here is the honest comparison, with real encoded examples.
Code 128 encodes all 128 ASCII characters in a compact symbol and is the best default for new label projects. Code 39 supports only 43 characters but tolerates poor print quality, which is why the military and auto industry still use it. Choose Code 128 unless your system specifically requires Code 39.
Head-to-head comparison
| Code 128 | Code 39 | |
|---|---|---|
| Character set | All 128 ASCII characters | 43: A to Z, 0 to 9, and - . space $ / + % |
| Density | High (Code C packs 2 digits per symbol) | Low (wide bars and spaces) |
| Check digit | Mandatory, modulo 103 | Optional, modulo 43 |
| Print tolerance | Needs decent print quality | Survives cheap printers and rough labels |
| Typical use | Shipping, logistics, asset labels | Military, automotive, nameplates |
| Best for new projects | Yes, the default pick | Only when required |
Code 128: the compact workhorse
Code 128 comes in three character sets. Set A covers uppercase, digits, and control codes. Set B covers the full printable ASCII range including lowercase. Set C encodes pairs of digits, so a 20-digit number takes only 10 symbols, which is why Code 128 dominates shipping labels full of tracking numbers.
Every Code 128 symbol ends with a mandatory modulo-103 check character. Here is a real example encoding A1 in Set B. The start character for Set B has value 104. A has value 33 and sits in position 1; 1 has value 17 and sits in position 2. The weighted sum is 104 + (33 x 1) + (17 x 2) = 104 + 33 + 34 = 171. Then 171 mod 103 = 68, and value 68 in Set B is the character d. So the full symbol is Start-B, A, 1, check character d, Stop. The scanner recomputes this on every read and rejects the scan if it does not match, which catches nearly all misreads.
Code 39: the rugged veteran
Code 39 is simpler and older. Each character is self-contained, the bars are wide, and the format tolerates photocopies, dot-matrix printers, and scratched nameplates. That ruggedness is why MIL-STD-1189 and the automotive industry standardized on it decades ago, and those standards keep it alive today.
Its check character is optional and uses modulo 43. Encoding A1: A has value 10 and 1 has value 1, so the sum is 11. Then 11 mod 43 = 11, and value 11 is B. A Code 39 symbol for A1 with a check character reads *A1B*, where the asterisks are the start and stop characters.
How to tell them apart visually
Code 39 symbols look airy: wide bars, wide gaps, and usually asterisks visible in the human-readable text. Code 128 symbols look dense: narrow bars packed tightly, with no asterisks. If the label holds lowercase letters or punctuation, it cannot be Code 39, since Code 39 has no lowercase.
Which should you choose?
- New inventory, asset, or shipping labels: Code 128. Smaller symbols, full character set, mandatory check digit, universal scanner support.
- Long numeric strings: Code 128 with Set C, which doubles numeric density.
- Harsh environments or legacy systems: Code 39, when the spec sheet or the customer demands it.
- Military or automotive contracts: Code 39, because the standards say so.
Ready to print? Generate Code 128 or Code 39 free: type your text, pick a size, and download a print-ready PNG with correct check characters.
Frequently asked questions
Is Code 128 better than Code 39?
For new projects, yes. Code 128 encodes the full ASCII set in a smaller symbol and every symbol carries a mandatory check digit. Code 39 only wins where its wide bars matter: poor printers, rough surfaces, and legacy standards that require it.
Is Code 39 still used today?
Yes. The US military, the automotive industry, and many defense contractors still require Code 39 on nameplates and labels because their standards were written around it. It is also common wherever labels must survive harsh handling.
How to tell if a barcode is 128 or 39?
Look at the density and the text. Code 39 looks airy with wide gaps and often shows asterisks as start and stop characters; Code 128 looks dense with narrow bars. Any lowercase letter means it is Code 128, since Code 39 cannot encode lowercase.
Is Code 128 still used?
Very much so. Code 128 is the dominant format for shipping labels, warehouse bins, and asset tags worldwide, and its GS1-128 variant carries supply-chain data like batch numbers and expiry dates across the logistics industry.
Ready to make your barcode? Generate a print-ready PNG in seconds, free, with correct check digits.
Try the free barcode generator