Home › Code 128 vs Code 39
Code 128 vs Code 39 — Technical Comparison and Decision Guide
Code 128 and Code 39 both encode alphanumeric data without requiring GS1 registration — they are internal-use formats you can populate with your own data. The practical difference is density: Code 128 encodes the same data in a significantly shorter barcode. For most new implementations, Code 128 is the better choice. Code 39 remains relevant only where your existing scanning equipment or industry standard explicitly requires it.
Direct Comparison
| Property | Code 128 | Code 39 |
|---|---|---|
| Character set | Full ASCII (128 characters) | Uppercase A–Z, digits 0–9, 7 symbols |
| Lowercase letters | Yes | No (requires Code 39 Extended) |
| Data density | High — shorter bar pattern per character | Low — wider bar pattern per character |
| Physical barcode width | ~30mm for 10 characters at 1× scale | ~55mm for 10 characters at 1× scale |
| Self-checking | No (requires check character) | Yes (pattern structure detects errors) |
| Check digit | Mandatory (mod 103, calculated automatically) | Optional |
| GS1 extension | Yes (GS1-128) | No |
| Common in | Logistics, FedEx/UPS, healthcare, retail backroom | Automotive, US DoD, legacy healthcare |
The Density Difference in Practice
To encode the string SHIRT-BLU-LG (12 characters):
- Code 128 — approximately 35–40mm wide at standard narrow bar width (0.25mm). Fits on a 1×2.5 inch label with room for human-readable text.
- Code 39 — approximately 65–75mm wide at the same scale. Requires a wider label or reduced bar height to fit.
This is not a minor difference. On small labels — medication packets, component bins, jewellery tags — Code 39 often cannot fit the same data that Code 128 handles easily. This is the primary reason Code 128 replaced Code 39 in most new systems.
When Code 39 Is Still Required
Automotive / VIN labels — the US automotive industry standardised on Code 39 through AIAG (Automotive Industry Action Group) standards. Vehicle identification number labels and some supplier delivery tags still specify Code 39.
US Department of Defense — MIL-STD-1189 and related standards specify Code 39 for many military asset labels. While the DoD has updated many standards to allow Code 128 and 2D codes, legacy equipment in many facilities still only reads Code 39.
Legacy healthcare systems — some hospital systems and blood bank equipment installed before the mid-2000s only support Code 39. If you are integrating with an existing system, confirm the scanner capabilities before switching formats.
GS1-128: Code 128 with Structure
GS1-128 (formerly EAN-128) is a specific application of Code 128 that uses GS1 Application Identifiers to encode structured data. A single GS1-128 barcode can encode a GTIN, a lot number, an expiry date, and a serial number in sequence — something Code 39 cannot do. GS1-128 is mandatory in some pharmaceutical and fresh food supply chains and is used on many retailer distribution centre labels. If you need to send structured data alongside your GTIN, GS1-128 is the correct choice over plain Code 128 or Code 39.
Making the Decision
Use Code 128 if you are building a new labelling system, if you need lowercase letters, if label space is limited, or if your scanners are from the last 20 years. Use Code 39 only if your industry standard, your customer's requirements, or your existing scanning equipment specifically requires it. If you are unsure what your scanners support, test with a Code 128 barcode first — virtually all scanners manufactured after 2000 read it.
Generate Code 128 or Code 39 Barcodes