Barcodes are an essential part of modern-day life. They help to automate processes and make it easier to identify, track and manage products. Barcodes are used in a variety of settings, from grocery stores to warehouses and beyond.
In the world of barcodes, there are many different symbologies and types. Each barcode symbology has its own unique features, advantages and disadvantages. Choosing a barcode symbology will depend on the needs of your particular project and other factors.
In this article, we will compare two popular 1D barcode symbologies: Code 39 and Code 128. Both have certain features that make them suitable for different applications. We’ll look at each symbology individually and then dive into a comparison between them based on several factors.
So, put on your learning hats and let’s dive in!
Check out our what is a barcode article for a basic introduction to barcode technology.
What is Code 39?
Code 39 (also called Code 3 of 9, Code 3/9, Alpha39, Type 39, USS Code 39, or USD-3) is one of the oldest barcode standards still in use today. It was developed in 1974 by Dr David Allais and Raymond Stevens, who worked at Interface Mechanisms Inc. (later renamed Intermec Corporation and now acquired by Honeywell).
Code 39 was the first liner barcode symbology that could encode both numbers and alphabets (uppercase only), making them more versatile than their predecessors. Code 39 quickly gained popularity in the 1980s and was widely adopted in many industries, including manufacturing, shipping, defence and logistics, owing to its ability to encode alphanumeric characters.
Not only can Code 39 encode numbers 0 to 9 and alphabets A to Z, but it can also encode a handful of special characters, including -, ., $, /, +, %, and space (”).
Code 39 got its name from the fact that it can hold a total of 39 characters. However, in the most recent version update, the character limit of Code 39 was increased to 43.
Code 39 received its official ISO standardisation (ISO/IEC 16388:2007) in 2007. It has served as a foundation for the development of numerous barcodes, with the most notable being Logistics Applications of Automated Marking and Reading Symbols (LOGMARS), which the United States Department of Defense uses.
Code 39 barcode is still popular and used extensively in the automotive and electronics industries.
For a full description of Code 39 Barcodes please refer to our article What is a Code 39 Barcode.
Extended Code 39
Extended Code 39 barcode, also known as Code 39 – Full ASCII symbology, is an extension to the original Code 39 standard.
Extended Code 39 barcode allows encoding all 128 ASCII characters (including lowercase letters, symbols and special characters), making it more versatile than the original Code 39.
Apart from the encoded character set, Extended Code 39 is the same as the original Code 39 in terms of structure, features and other characteristics.
What is Code 128?
Code 128 barcode is a high-density liner barcode symbology. It is a newer barcode compared to Code 39. Code 128 barcode was introduced in 1981 by Ted Williams of Laserlight Corporation.
Code 128 was developed with the aim of overcoming the problem of expressing both alphabetic and numeric characters without sacrificing barcode density. It was presented as an improvement over the existing Code 39 and Code 11 barcodes.
Code 128 bar code is capable of encoding the full 128 ASCII character set, including alphabets (upper and lowercase), numbers, special characters, and control codes (such as tab, enter, etc.). Since Code 128 can represent all characters (excluding Japanese kanji, katakana and hiragana) that can be typed on a computer keyboard, it is commonly referred to as a computer-friendly barcode.
Code 128 is a variable-length barcode, i.e., it does not have a fixed length. Unlike Code 39, which has a limited character length of 43 characters, Code 128 has no character length limitation and can encode any length of data.
Code 128 also got its official ISO standardisation (ISO/IEC 15417:2007) in 2007. It is most commonly used in shipping labels and is widespread in many non-retail environments, including warehousing, packaging, logistics, shipping, and transportation.
Variants of Code 128
Code 128 have three subsets based on the character code set it uses to encode information. These three types of Code 128 are.
- Code 128A – Encodes ASCII characters 00 to 95 and Function code (FNC) 1–4.
- Code 128B – Encodes ASCII characters 32 to 127 and FNC 1–4.
- Code 128C – Encodes numeric digit pairs from 00 to 99, three special characters and FNC1. Code 128C is a numeric-only barcode type.
Refer to our article on barcode types to explore a world filled with unique symbols that pack in plenty of info!
Now that we have discussed both Code 39 and 128 individually, let us compare them based on several factors.
Code 39 VS Code 128 Comparison Table
Here is a table containing the main differences between Code 39 and Code 128 barcode symbologies.
Numbers, uppercase alphabets, special characters and space characters.
Full 128 ASCII character set
Maximum Data Capacity
Self-detection, check digit not necessary
Has check digit calculated using Modulo-103
Does not support error correction
Has a mandatory error correction character
Yes, ISO/IEC 16388:2007
Yes, ISO/IEC 15417:2007
Code 128 VS Code 39 - A Detailed Explanation
Below is a detailed explanation of the differences between Code 128 and Code 39 barcode symbologies.
The character set refers to the type of characters that a barcode can encode. It is the most significant difference between Code 128 and code 39.
Code 39 encodes the following characters.
- Numeric digits – 0 to 9
- Uppercase alphabets – A to Z
- Symbols – Percent sign (%), plus sign (+), hyphen (-), dollar sign ($), slash mark (/), period (.)
- Space character (”)
On the other hand, Code 128 encodes the full 128 ASCII set.
ASCII stands for the “American Standard Code for Information Interchange”. It was the encoding standard character set used between computers on the Internet.
ASCII is a 7-bit character set that contains 128 characters which include all uppercase and lowercase alpha data, numeric digits, symbols and control codes (except horizontal tab, carriage return and line feed).
A barcode’s data capacity describes the maximum number of characters (data) that can be encoded and stored in a particular barcode type.
Code 39, at present, has a limited data capacity of 43 characters.
Whereas Code 128 has no maximum character limitation and hence can store any length of data.
Barcode density refers to the number of characters that can be encoded per inch of a barcode. The density of a barcode is influenced by the barcode symbology that is being used, as well as by how thick the narrow and wide bars and spaces are.
As barcode density increases, the required space for printing a barcode decreases, making it easier to store more data within a smaller area. In other words, a high density barcode means a smaller barcode size, whereas a low density barcode means a larger barcode size.
Code 39 is a moderate-density barcode. It has a maximum character density of 9.8 characters per inch (3.7 characters per cm).
Code 128 is a higher-density barcode. It has a maximum character density of.
- 24.24 characters per inch (9.54 characters per cm) for numerical characters.
- 12.12 characters per inch (4.77 characters per cm) for other ASCII characters.
Error detection is the ability of a barcode to detect errors in the encoded information. It is done by using a check digit to validate the scanned data.
Code 39 is a self-error detection barcode. Therefore, a check digit is usually not necessary. In case a check digit is needed, Modulo 43 checksum can be used.
Code 128 has a mandatory requirement of including a check digit. The check digit of a Code 128 barcode is calculated using the Modulo 103 algorithm.
Error correction is the capability of a barcode to restore data and remains scannable even if it is dirty or damaged.
Code 39 has no error correction capability.
Whereas Code 128 features a mandatory error correction character.
International Organization for Standardization (ISO) is an independent, non-governmental international organisation that develops and publishes a range of proprietary, industrial, and commercial standards.
Both Code 39 and Code 128 barcodes received an ISO certification in 2007.
Code 39 is present in ISO/IEC 16388:2007 standard.
Code 128 is present in ISO/IEC 15417:2007 standard.
Similarities Between Code 39 and Code 128 Barcode
Code 128 and Code 39 barcodes also share some common features. Here is a list of similarities between a Code 128 and Code 39 barcode.
- Code 128 and Code 39 are linear barcode symbologies.
- Both can encode the same set of numeric digits and uppercase letters.
- Codes 128 and 39 have been certified by ISO and can be used in any part of the world.
- They can be scanned from all kinds of barcode scanners.
- Code 39 and Code 128 can not be read by mobile phones.
- They do not support any type of customisation (apart from colour changes).
- Both Code 128 and Code 39 are public domain and can be used without royalty or licence fees.
- The two barcodes contain human-readable characters located below the barcode.
- Code 39 and Code 128 have no strict sizing requirements as per any certifications. However, the recommended minimum barcode height is 5.0 mm or 15% (whichever is greater) of the total barcode width (excluding quiet zones).
How to Design and Print a Code 128 and Code 39 Barcode?
Designing Code 39 and Code 128
As previously mentioned, Code 128 and Code 39 barcodes are public domain technology. As a result, there are a bunch of free online barcode generators available to design Code 128 and Code 39 barcodes.
However, free tools are not recommended as they sometimes encode inaccurate data, provide low-quality barcode images and limit the ability to customise the size, resolution, barcode font, and other features of a barcode.
Therefore, it is highly recommended to use professional label-designing software like Seagull Scientific’s BarTender software. The BarTender is not only a label-designing software but also a printer management tool that helps to manage and automate the entire labelling operations.
Triton is proud to be an authorised reseller of the BarTender software and offers the product at unbeatable prices that will make your wallet happy. We offer all four editions of BarTender, namely, Starter Edition, Professional Edition, Automation Edition and Enterprise Edition. Contact us today by filling out a form here or via the live chat widget below.
Printing Code 39 and Code 128
Code 39 and 128 barcodes can be printed using various printing technologies such as inkjet, laser and dot matrix.
However, thermal printing technology is preferred as it produces high-quality barcode images with good edge definition, clarity, and contrast. Thermal printing is of two types, direct thermal printing and thermal transfer printing. Refer to our guide on direct thermal vs thermal transfer printing to learn in detail about these print technologies.
Triton is your one-stop shop for all your thermal printing needs. We offer a wide range of direct thermal printers and thermal transfer printers from renowned brands like Zebra, TSC and Honeywell. From desktop label printers and barcode label printers to industrial label printers, we have it all at unbeatable prices.
Not only do we supply thermal printers, but we also provide printer consumables like thermal transfer ribbons, thermal labels, thermal carton labels, thermal carcase tags, and food-compliant thermal inserts. We also have spare printer parts and accessories, such as thermal print heads, to keep your printers running.
So, what are you waiting for? Shop with us today and get yourself the best thermal printers at the best price possible. Get in touch with our friendly customer service representative via the live chat widget below to learn more.
The Bottom Line
Both code 39 and code 128 have their own unique features that make them suitable for various applications.
In general, owing to its excellent density and a much larger selection of characters, Code 128 appears to be the best choice in many scenarios. On the other hand Code, 39 has one advantage of being easily integrated into an existing barcode printing system as it does not include a check digit.
However, when it comes to choosing between these two symbologies, it is important to consider the requirement of the application and then decide which symbology to use. Our how to choose the correct barcode type guide will come in handy while making this decision.
We hope this article has given you an insight into the two popular barcode types, Code 39 and Code 128.
Thanks for reading!