What is the Difference Between Code 39 and Code 128?
Code 39 (including its extended version) and Code 128 are both 1D barcode symbologies that support alphanumeric data. They are widely used in non-retail environments such as library systems, asset tracking, membership cards, and small-item labeling. This article compares Code 39 (standard and extended) with Code 128 to help you choose the right symbology for your needs.
👉 Scan Code 39 and Code 128 Online >

Key Takeaways
- Code 128 encodes more data in less space. It supports all 128 ASCII characters across three subsets (A, B, C), while standard Code 39 is limited to 43 characters.
- Code 128 includes built-in error detection, while Code 39 does not. Code 128 uses a mandatory modulo-103 check digit, making it significantly more reliable in high-volume scanning environments.
- Code 39 Extended can match Code 128’s character set, but it encodes non-standard ASCII characters as character pairs. This roughly doubles the barcode length, reducing scan efficiency.
- For new implementations, Code 128 is almost always the better choice, unless you are integrating with a legacy system that only supports
- Both symbologies are widely supported. Any modern barcode reader SDK, including Dynamsoft Barcode Reader, handles Code 39, Code 39 Extended, and Code 128 out of the box.f the box.
What Are the Key Differences Between Code 39 and Code 128?
Code 39 vs. Code 128 at a Glance
- Code 128 supports the full ASCII 128 character set natively.
- Standard Code 39 supports 43 characters, while Code 39 Extended uses combinations of those characters to represent the full ASCII 128 set (at the cost of longer barcodes).
- Code 128 has a higher data density and includes a check digit for better error detection.
- Code 39 is easier to implement and scan in low-demand applications but less efficient for compact encoding.
Comparison Table: Code 39 vs. Code 128
Code 39 was introduced in 1974 and became one of the first widely used alphanumeric symbologies. Code 128 came later (1981) and was designed to offer:
- More compact encoding.
- Greater character set support.
- Error detection via checksum.
Code 128 is technically superior in most ways. It can fully replace Code 39, including Code 39 Extended, in modern systems.
| Feature | Code 39 (Standard) | Code 39 Extended | Code 128 |
|---|---|---|---|
| Year Introduced | 1974 | 1974 (extension) | 1981 |
| Character Set | 43 chars (A–Z, 0–9, -, ., space, $, /, +, %) | Full 128 ASCII via character pairs | Full 128 ASCII (Subsets A, B, C) |
| Data Density | Low–Moderate | Low (longer barcodes) | High |
| Max Practical Capacity | ~20–25 characters | ~10–15 characters (doubles length) | ~48 characters |
| Check Digit | Optional, rarely used | Optional, rarely used | Mandatory (modulo-103) |
| Error Detection | Self-checking only | Self-checking only | Strong (mandatory check digit) |
| Error Correction | ✗ Not supported | ✗ Not supported | ✗ Not supported |
| Typical Use Cases | Asset labels, library books, membership/ID cards | Same as standard + non-alphanumeric chars | Shipping, warehousing, logistics, GS1-128 |
| Best For | Legacy/simple systems | Full ASCII on older systems | Modern, high-volume, compact labeling |
Data Capacity: How Many Characters Can Each Barcode Hold?
- Code 39 Standard encodes 43 characters total.
- Code 39 Extended allows full ASCII support using combinations, but doubles the length for non-standard characters.
- Code 128 encodes all 128 ASCII characters directly, using subsets A, B, and C for optimization.
Barcode Density: Which Is More Compact?
- Code 128 offers significantly higher data density than Code 39, making it a better choice when label space is limited or high-resolution output is required.
- Low-density barcodes like Code 39 may be harder to read in poor printing or imaging conditions.
Error Detection: Does Code 39 or Code 128 Have a Check Digit?
- Code 39: No check digit by default. Optional but rarely used.
- Code 128: Includes a mandatory check digit, improving error detection in scanning.
🚀 Choosing Between Code 39 and Code 128
- Use Code 39 (or Code 39 Extended) if:
- You’re working with older systems or simpler applications.
- Barcode length isn’t a concern.
- You need easier integration and no requirement for error correction.
- Choose Code 128 if:
- You need compact and high-density barcodes.
- Your application requires full ASCII and robust error checking.
- You’re handling logistics, shipping, or large inventories.
Try Dynamsoft Barcode Reader
Dynamsoft Barcode Reader supports both Code 39 and Code 128, including Code 39 Extended. You can easily embed barcode reading into web, desktop, or mobile apps using just a few lines of code.
Download Dynamsoft Barcode Reader SDK
Try the Online Demo
Start your free 30-day trial and explore sample projects, tutorials, and API documentation to integrate barcode scanning with ease.
Frequently Asked Questions
Can Code 128 fully replace Code 39?
Yes. Code 128 supports all Code 39 characters, offers higher data density, and improves error detection. It is preferred in most modern applications and replaces both standard and extended Code 39.
Is Code 39 still used today?
Yes. Code 39 remains in use for legacy systems, government and military logistics (including the DoD’s LOGMARS standard), and where simplicity and broad scanner compatibility are more important than data density.
What is the difference between Code 39 and Code 39 Extended?
Standard Code 39 encodes 43 characters: uppercase A–Z, digits 0–9, and eight special characters. Code 39 Extended uses pairs of standard characters to represent the full 128-character ASCII set, doubling the barcode length for non-standard characters.
Does Code 128 have better error detection than Code?
Yes. Code 128 requires a modulo-103 check digit in every barcode. Code 39 is self-checking, but its optional check digit is seldom used, which increases the risk of misreads.
Which barcode is better for shipping labels — Code 39 or Code 128?
Code 128, especially the GS1-128 variant, is the industry standard for shipping and logistics. It encodes data more compactly and meets most carrier and compliance labeling requirements.
What is the maximum data capacity of Code 128 vs. Code 39?
Neither symbology has a strict character limit. In practice, Code 128 reliably encodes up to about 48 characters, while Code 39 is typically limited to 20–25 characters for reliable scanning. Code 39 Extended has even lower capacity due to paired encoding.
Related Articles
A series on different types of barcodes
- The Comprehensive Guide to 1D and 2D Barcodes
- Difference Between UPC and EAN
- Difference Between Code 39 and Code 128
- Difference Between QR Code, PDF417 and DataMatrix
- Difference Between Intelligent Mail barcode, Postnet and Planet
If you’d like to compare other barcode types, please check out our online barcode comparison tool.
Blog