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 >
Code 39 vs. Code 128: Key Differences
Summary
- 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 & Extended) | Code 128 |
---|---|---|
Density | Moderate density | High density |
Character Set | Standard: 43 characters (A–Z, 0–9, space, - . $ / + %) Extended: Full ASCII via character pairs (e.g., +A = a ) |
Full ASCII (128 characters) via subsets A, B, and C |
Max Capacity | Unlimited (usually practical for 20–25 characters) Extended version increases length for full ASCII support |
Unlimited (typically up to 48 characters in common applications) |
Error Detection | Self-checking, optional check digit (rarely used) | Built-in modulo-103 check digit |
Error Correction | Not supported | Supported via mandatory check character |
Best For | Simple asset labeling, older systems, less dense requirements | High-volume, compact labels, full ASCII data, better performance |
Use Cases | Asset labels, library books, ID/membership cards, internal tracking, government/military logistics | Shipping labels, warehouse inventory, supply chain, compliance labeling |
Capacity
- 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.
Density
- 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.
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.
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.