The Ultimate Guide to Code 128 Barcodes

what do you mean by code 128 barcodes

Share This Post

Barcodes have become an essential tool for many businesses around the world. They offer an efficient and accurate way to identify and track items, making inventory management and sales transactions a breeze. One of the most popular types of barcodes is the Code 128 barcode. 

In this article, we’ll take a closer look at Code 128 barcodes. We will learn about Code 128 barcode’s structure, its advantages, and some best practices for designing and printing it. 

So, without further ado, let’s get started.   

What is a Code 128 Barcode?

Code 128 barcode

Code 128 is a liner barcode symbology that offers superior functionality compared to other standards, such as Code 39 and Interleaved 2 of 5

Code 128 was designed with the goal of providing greater density while being able to accommodate alphabetic, numeric and special characters. It is a variable-length barcode, meaning it has no limit on the number of characters that can be encoded. This makes code 128 ideal for applications such as shipping labels where a combination of data types is required.

Code 128 was created in 1981 by Ted Williams. The barcode is popular because it can incorporate all 128 ASCII characters. ASCII is a standard character encoding used to depict text in gadgets like computers. The ASCII standard defines 128 characters, including letters, numbers, control characters, and punctuation marks.

Code 128 is defined in ISO/IEC 15417:2007 standards. 

How to Recognise a Code 128 Barcode Symbol?

Identifying Code 128 barcode

Code 128 barcodes can be identified by their distinct pattern of bars and spaces. 

Each character in a Code 128 symbol begins with a bar and ends with a space (except for the stop character, which adds an extra bar). These bars and spaces have four different widths – 1, 2, 3 or 4 units – with the sum of the bar widths being even and the sum of the spaces being odd for a total of 11 units per character. 

Additionally, Code 128 symbols contain ‘quiet zones’ of at least ten times the width of a single module (i.e.10 times the width of the narrowest bar or space) on either side of the symbol. 

Why Do You Need Code 128 Barcodes?

Code 128 is a type of barcode that is great for encoding lots of data compactly and densely. It’s widely used in various industries, like healthcare and logistics.

Code 128 helps with identifying items and tracking them automatically, making inventory control and supplier management more efficient. Besides, it also stores useful information, such as the date of production or the weight of items.

Ultimately, code 128 barcodes provide a technological advantage and more cost-effective solutions due to their compact size. 

Character Set of a Code 128 Barcode

Character set of Code 128 barcode

The Code 128 character set itself contains only 102 characters; however, the symbology supports all 128 lower ASCII characters. This is due to the three different character sets that are supported by Code 128, which are:

  • Code Set A
  • Code Set B
  • Code Set C

Code Set A includes:

  • All numeric values (0-9)
  • Uppercase alphabetic characters (A-Z)
  • Punctuation marks
  • Seven special characters
  • “Control” characters (ASCII values 00 through 95)

Code Set B supports:

  • All numeric values (0-9)
  • Uppercase and lowercase alphabetic characters (A-Z, a-z)
  • Punctuation marks
  • Seven special characters (ASCII values 32 through 127) 

Code Set C contains:

  • All numeric digit pairs from 00 through 99
  • Three special characters

Each character in Code Set C represents two digits.

Anatomy of a Code 128 Barcode

Detailed anatomy of Code 128 barcode

Code 128 barcodes comprise several distinct parts that work together to encode data. This includes.

  • Leading and trailing quiet zones 
  • Start character 
  • Data character 
  • Check character 
  • Stop character 

Start Character

The start character of the Code 128 barcode helps the barcode scanner correctly interpret the encoded data. It serves as a marker to indicate which character set is used within the symbol.

The three different start codes designated for Code 128 are Code Set A, Code Set B, and Code Set C. Based on the information that needs to be encoded in a portion of the bar code, one of these start characters will be used accordingly.

Data Characters

Data characters are composed of six elements, three bars and three spaces. This differs from UPC/EAN barcodes which use only four elements per character: two bars and two spaces. 

Since each Code 128 character is composed of six elements, it has a 50% lower density compared to UPC/EAN barcode symbols. 

Check Digit

The check digit of Code 128 is a unique number calculated using the Modulo 103 algorithm. The check digit appears just before the stop character but does not contain human-readable information.

Using a check digit allows for greater accuracy in Code 128 barcodes since it adds an extra layer of protection against errors.

Stop Character

The stop character of the Code 128 barcode marks the end of the barcode sequence. It has a value of 106 for all three Code Sets.

The stop character is represented by a pattern of four bars and three spaces, unlike other characters, which are represented by three bars and three spaces.

Code 39 vs Code 128 - What's the Difference?

Difference between Code 39 and Code 128 barcodes

Code 39 and Code 128 are popular types of barcodes that are often confused with one another. People often mistake them for one another, but they actually have differences. 

Let’s examine the differences between Code 128 and Code 39 barcodes. 

Code 39
Code 128
Character Set
Encode Alphanumeric Characters
Encode Extended ASCII Characters
Data Capacity
43 Characters
Symbol Length
Error Detection
Self-Detection, Check Digit Usually not Necessary
Modulo-103 Check Digit to Detect Error

Advantages of Code 128 Barcode

List of six points on advantages of Code 128 barcode

Code 128 barcode is a high-density barcode symbology that encodes large amounts of data in a small space. It is capable of encoding all 128 ASCII characters, more than the limited subset of symbols available with other barcode systems.

Let’s have a look at the benefits of the Code 128 barcode.

  • Code 128 barcodes are extremely efficient, requiring only six elements to encode the same information that other code formats require nine elements for. 
  • It can encode all ASCII characters, including all special characters, without performing any complicated procedures like other code formats.
  • Code 128 has measures in place to ensure data security with minimised chances of errors occurring during scanning operations.
  • The use of Code 128 reduces label space needed for messages with six or more characters while still providing high message integrity levels.
  • The barcode offers three distinct subsets – Code A, B & C allowing flexibility in various applications.
  • Code 128 is compatible with UCC/EAN coding standards making it ideal for global distribution systems.

How to Get a Code 128 Barcode?

It’s easy to get a Code 128 barcode. 

First and foremost, you’ll need a Code 128 barcode generator. Numerous websites and companies provide these generators for free. All you have to do is fill in the necessary information (such as text or numbers). The generator will generate a unique barcode with your specified information encoded into it.

Once the code has been generated, you can print it onto labels or paper using a laser or thermal printer. It is important to remember that despite being free of charge, the barcode quality should still be considered when deciding where to print it from.

Designing Rules of Code 128

Having an effective barcode is important for any business to succeed. As such, businesses must be aware of the best practices when designing their barcodes and labels. By implementing the right strategies, businesses can maximise their barcode and label effectiveness while avoiding costly mistakes. 

The most important factors to consider when designing Code 126 barcodes are the X-dimension, quiet zones, and barcode height. 


The X-dimensional measure is the width of the smallest bar or space within the barcode. For Code 128 codes, the X dimension should be 0.1905 mm (0.0075 inches).

Design rule of X-Dimension
Point on design rule of barcode height in Code 128 barcode

Barcode Height

The proper height of the barcode should be considered when creating Code 128 barcodes. 

The minimum symbol height of Code 128 should be 5 mm (0.2 inches) or 15% of the symbol width, whichever is greater. 

Quiet Zones

Quiet zones are blank spaces that appear both before and after the Code 128 barcode. They are an essential part of the barcode as they provide visual cues to scanning devices, allowing them to properly identify and interpret the data encoded in the barcode. 

The Quiet zones of a Code 128 barcode must be 10X wide, with ‘X’ representing the current X dimension of the barcode. 

Point on design rule of quiet zone in Code 128 barcode

Printing Rules of Code 128 Barcodes

Five printing rules of Code 128 barcode

Using barcodes to track products has become an essential part of modern business. However, in order for these barcodes to be scanned accurately, certain guidelines must be followed when printing the Code 128 barcode. These include.

  1. Format barcodes in pure black on a white background. If colour is needed, use the darkest font colour and lightest background for maximum contrast.
  2. Make sure there is a clear white (or very light) border all the way around your barcode.
  3. Set printer settings to highest or photo quality. It is best to use at least 300 dpi print resolution for larger print batches if necessary. 
  4. Print with a thermal printer for the best results.
  5. Test the scalability of printed codes to ensure accuracy.

Thermal printers are a must-have for businesses that rely on Code 128 barcodes. 

Thermal printers deliver exceptional accuracy and precision while being cost-effective, as they do not require ink or toner. Not only that, but they are also faster than other types of printers, resulting in greater productivity and fewer maintenance needs. 

At Triton, we have everything you need for thermal printing. We offer a wide selection of thermal printers from trustworthy brands like Honeywell, Zebra and TSC. Our inventory includes a variety of printer models, such as direct thermal printers, thermal transfer printers, barcode label printers, desktop printers and industrial printers. With such a wide range of thermal devices, you are sure to find the perfect solution for your needs. 

We also offer high-quality print consumables that work well with thermal printers and provide long-lasting adhesion and optimal print quality. Our consumables range includes thermal transfer ribbons, thermal labels, thermal carton labels, thermal carcase tags, and food-compliant thermal inserts, all of which meet strict quality standards. 

At Triton, we guarantee top-quality products at competitive prices. You can always reach out to our customer service team via the live chat widget for any inquiries or issues you have. Choose Triton and experience unparalleled quality and reliability in thermal printing.

Make Label Designing and Printing Easy With BarTender Software

Seagull Scientific’s BarTender software is the world’s most trusted label design and printing solution. With BarTender, you can easily design, manage, automate and print labels, barcodes and tags quickly and accurately.

BarTender software can integrate smoothly with your existing business systems and infrastructure, making label design and printing a breeze. You can connect multiple data sources simultaneously to create custom labels and barcodes. This includes data from databases, CSV files, date/time, or serialisation. 

BarTender software has a vast library of 400 preformatted barcode components that abide by over 105 barcode symbologies and numerous barcode standards. As a result, users have extensive flexibility when it comes to creating various types of barcodes. Please check our understanding BarTender software guide to learn more about this amazing software.

At Triton, we offer BarTender software at unbeatable prices. We offer four editions of the on premise software version – Starter Edition, Professional Edition, Automation Edition and Enterprise Edition and the cloud edition – BarTender Cloud.  

Contact us via the live chat widget below, or fill out a form here for any questions. 


Code 128 is a great option for businesses that need to store and efficiently communicate large amounts of data. It offers more concise encoding than other barcode standards, making it ideal for applications where space is at a premium. 

Additionally, the use of multiple character sets makes it one of the most secure linear barcodes available today. All these features make Code 128 an attractive choice for any organisation looking to streamline its operations through automated data capture solutions. 

We hope this article has given you deep insight into Code 128 barcodes. 

Thanks for reading! 

Latest Articles

Learning Centres