Our Blog

The Code 39 vs Code 128 Guide: Differences and Similarities

Choosing the right barcode for your business operations means understanding the differences between popular barcode symbologies, such as Code 39 vs Code 128. Both of these barcode types are widely used across a variety of industries, but each serves a unique purpose, depending on the data you need to encode and the available space. 

In this guide, we’ll explain the differences and similarities between Code 39 vs Code 128. We’ll also talk about when to use each type and how to create and print barcode labels. Whether you’re managing inventory or shipping products, choosing the right barcode can make all the difference to your operational efficiency. 

Request A Proposal

GTIN vs UPC

What Is Code 39?

Code 39 is a type of barcode symbology that can encode alphanumeric characters. Code 39 is often used to label goods, inventory, ID badges, and more where a simple barcode is needed. Developed in 1974 by Dr. David Allais and Raymond Stevens, Code 39 is one of the oldest barcode symbologies in use. 

Some key features of Code 39 include:

  • Character set: It can encode digits 0-9, uppercase letters A-Z, and a few special characters like the hyphen (-),  dollar sign ($), plus sign (+), slash (/), percent sign (%), period (.) and space ( ). 
  • Start/stop characters: Every Code 39 barcode begins and ends with an asterisk (*) that serves as the start and stop delimiter. 
  • Variable length: The length of the barcode can vary depending on how many characters need to be encoded. When first introduced, Code 39 could encode up to 39 characters. Today, the limit has been increased to 43. 
  • Self-checking: Code 39 is a self-checking symbology so it does not require a separate checksum. However, a checksum can be added for error detection. 

Code 39 is also referred to as “3 of 9 code” because each character is represented by nine bars, with three of those bars being wide. 

What Is Code 128?

Code 128 is a high-density barcode symbology used for encoding alphanumeric and numeric data. It is commonly used in logistics, shipping, and inventory management because it can encode large amounts of data in a small space. Code 128 has been in use since it was introduced in 1981 by Ted Williams. Like Code 39, Code 128 can vary in length. However, Code 128 has no character limit, which makes it more flexible than Code 39. 

Some key characteristics of Code 128 include: 

  • Character set: It can encode the entire ASCII 128-character set, which includes:
    • Upper and lowercase letters A-Z/a-z
    • Numbers 0-9
    • Special characters and control codes
  • Three character sets: Code 128 has three subsets (A, B, and C):
    • Code 128A: Includes uppercase letters, numbers, punctuation, and control codes (TAB, CR/LF, FNC 1-4, etc)
    • Code 128B: Includes uppercase and lowercase letters, numbers, and punctuation, but no control codes
    • Code 128C: Used exclusively for encoding pairs of digits, making it highly efficient for numeric data
  • High data density: Code 128 is more compact than Code 39, allowing more information to be encoded in a smaller space
  • Checksum: Code 128 uses modulo-103 checksum to ensure data accuracy
  • Start/stop characters: Each barcode begins with a start symbol that corresponds to the specific subset and ends with a stop symbol

Because it’s versatile and compact, Code 128 is often used in shipping labels, retail products, and various industrial applications. 

How Are They Different?

When comparing Code 39 vs Code 128, each code has a number of differences that makes it unique. Although they are both used to create one-dimensional barcodes, each symbology differs in terms of data capacity, encoding capability, size efficiency, and use cases. Here’s a comparison of how the two are different from one another: 

  • Character set: 
    • Code 39 encodes 43 characters, including uppercase letters, numbers, and a few special symbols
    • Code 128, on the other hand, encodes the full ASCII 128-character set, including uppercase and lowercase letters, numbers, special symbols, and control characters
  • Data density: 
    • In Code 39, each character is represented by 9 elements–5 bars and 4 spaces. This takes up more room compared to Code 128. 
    • In Code 128, each character is represented by 6 elements, so it can encode more data in a smaller barcode. 
  • Length: 
    • Code 39 is limited to 43 characters. However, it’s best used with short, simple strings of data, such as product IDs and inventory codes. Otherwise, the barcode can get very long. 
    • Code 128 has no character limit, and because it has a high data density, it’s much more efficient than Code 39 for long strings of data. 
  • Checksum:
    • Code 39 uses an optional checksum of modulo 43. The checksum isn’t mandatory because Code 39 is a self-error detection barcode.  
    • Code 128 requires the use of a checksum (modulo 103), which ensures the accuracy of data. 
  • Start/stop characters: 
    • Code 39 uses an asterisk (*) as the start/stop character, which is visible in the barcode. 
    • Code 128 uses special, non-visible start and stop symbols that depend on the subset (A, B, or C).
  • Uses:
    • Code 39 is common in less complex applications like inventory management, ID cards, and simple product labeling where fewer characters need to be encoded. 
    • Code 128 is especially useful for logistics, shipping, and supply chain applications where large amounts of data need to be encoded.
  • Error correction:
    • Code 39 does not include any features for error correction. If the barcode is damaged or obstructed, it won’t be scannable. 
    • Code 128, on the other hand, does have error correction features. If the barcode is damaged, it should still be scannable. 

Custom Barcode Labels

When to Use Code 39

Now that you understand the differences between Code 39 vs Code 128, let’s talk about when to use each. Code 39 works well with short, simple data when space isn’t limited. If you’re using older scanning equipment, you’ll likely want to stay with Code 39. Older or basic barcode scanners can often read Code 39 better than Code 128 because of its simpler structure. 

Essentially, you should use Code 39 if:

  • The data you need to encode is short and simple.
  • You’re using an older scanner.
  • You don’t have space constraints.

Here are some of the most common uses of Code 39:

  • Inventory management: Use Code 39 labels to track stock, equipment, and tools in warehouses and other kinds of storage facilities. Code 39 is used to encode product IDs, stock numbers, and simple alphanumeric codes for easy identification. 
  • ID cards: Employee ID cards, membership cards, and access badges often use Code 39 to encode a unique identifier or access code for individuals. These barcodes are scanned at entry points for quick verification. 
  • Government/military applications: Numerous military and government organizations rely on LOGMARS, a military logistics barcode system that uses Code 39 for tracking equipment, supplies, and assets. 
  • Product labeling: Many companies use Code 39 for basic product labeling, especially with short codes like serial numbers or product IDs. 
  • Healthcare: Hospitals and clinics use Code 39 to identify patients and to label medical equipment or samples for tracking. 
  • Shipping: In some logistics operations, Code 39 is used to label packages, bins, and pallets for basic tracking during shipping and receiving processes. 
  • Tool and equipment tracking: Code 39 is commonly used to label tools, equipment, and other assets to keep track of inventory and prevent loss or theft. 
  • Libraries: Some libraries use Code 39 to label books and materials, making it easier to scan and track inventory through library management systems. 

When to Use Code 128

Code 128 has a high data density and can handle more complex data. Code 128 can encode the full ASCII 128-character set, which gives you much more flexibility with your data. And because it uses checksums, Code 128 works well when data accuracy is critical. 

Essentially, you should use Code 128 if:

  • You need to encode a large amount of information in a small space. 
  • You need to encode a mix of uppercase and lowercase letters, numbers, and special characters. 
  • High data accuracy and security are critical to your operations. 

Some of the most common uses of Code 128 include: 

  • Logistics: Logistics is one of the most common applications for Code 128. It’s widely used by shipping carriers like UPS, FedEx, and USPS for package tracking labels because it can encode large amounts of information compactly. 
  • Serial numbers: Code 128 is often used for product packaging to encode detailed information like manufacturer, batch numbers, and expiration dates. Additionally, items that need to be tracked at the individual unit level are often labeled with Code 128 barcodes. 
  • Healthcare: In the healthcare industry, Code 128 is used to track medical devices, prescription drugs, and patient information, where the ability to encode long, complex data strings is critical. For example, GS1-128 (a version of Code 128) is used for  barcoding medicines to include batch numbers, expiration dates, and other information to comply with regulations. 
  • Retail: Retails uses Code 128 in cases where most data needs to be encoded on product labels or point-of-sale (POS) systems for inventory tracking. It’s especially useful for product serialization on electronics and other high-value items. 

How Are They Similar?

Looking at Code 39 vs Code 128, there are a number of similarities even with their many differences. Here’s how the two barcode symbologies are alike: 

  • Linear barcodes: Both Code 39 and Code 128 are 1D or linear barcodes. This means they are scanned horizontally with a single line of bars and spaces. 
  • Alphanumeric: Both symbologies are able to encode alphanumeric data (numbers and letters). However, Code 128 can handle many more complex characters. 
  • Widely used: Both codes are widely used in industries like manufacturing, retail, and logistics, especially for tracking, identification, and labeling. 
  • Standard scanners: Since they are both 1D barcodes, Code 39 and Code 128 can both be scanned using a typical barcode scanner. This makes them practical for many commercial and industrial applications. 
  • Variable length: Both of these symbologies have variable lengths, meaning there is no fixed length required. The barcode can adjust depending on how many characters are encoded. 
  • Start/stop characters: Both Code 39 and Code 128 have specific start and stop characters to mark the beginning and the end of the barcode. 
  • ISO certification: In 2007, both Code 39 and Code 128 received certification from the ISO (International Organization for Standardization).

How to Design and Print Code 39 and Code 128 Labels

Using Code 39 and Code 128 labels in your organization can help you automate many processes to improve efficiency and reduce manual errors. But how do you design and print these labels? Here’s a step-by-step process:

  1. First, you need to determine the data you need to encode. Code 39 is more limited than Code 128, so make sure you know which type of barcode will suit your needs best. 
  2. Next, you can generate the barcode. When deciding between Code 39 vs Code 128, the good news is that both barcode symbologies are public domain. This means that you don’t have to pay any organization to generate the barcodes for you. There are a number of free barcode generators online that you can use, but paid software is generally more accurate. 
  3. Now it’s time to design the label. Choose the layout, add the barcode, and then add any other text and elements you need, such as your company logo or product name. Avoid making the barcode too small, which can affect scannability. 
  4. Print the labels. While both Code 39 and Code 128 can be printed on inkjet, laser, or dot matrix printers, it’s best to stick with thermal printers, which offer the clearest results. You can use a direct thermal or thermal transfer printer. Make sure you use the right type of material for your application. Print a sample label and test it to make sure it scans accurately before you print the whole batch. If you don’t want to print the labels yourself, you can rely on a custom label manufacturer like Coast Label. 

Some tips for printing barcode labels: 

  • Barcode size matters. Make sure the barcode is large enough for scanners to read. A barcode that’s too small or too dense can lead to scanning errors. 
  • Use high-quality label materials to avoid smudging ro fading, especially if the labels will be subject to harsh environmental conditions. 
  • Make sure the barcode and other elements on the label are well-aligned and do not overlap. Misaligned barcodes are difficult to scan. 
  • If you’re applying the label to products, make sure the surface is clean and the label is firmly attached. 

Code 39 vs Code 128 Conclusion

Choosing between Code 39 vs Code 128 barcodes doesn’t need to be difficult. Both barcode symbologies offer a number of benefits for various industries. Code 39 is best when the data you’re using is fairly simple and you don’t have any space constraints. Code 128, on the other hand, can handle much more complex data in tighter spaces. And remember that you can use a combination of both to take care of various needs. 

If you need Code 39 and Code 128 barcode labels, let Coast Label take care of you. We can handle all of your barcode label needs, whether you need someone to print the labels for you or simply to supply you with custom blank labels. We use only the best materials to create high-quality labels that will last through the toughest industrial conditions. Contact us today for a proposal. 

Request A Quote

The Code 128 and GS1-128 Guide

Call Now Button