Barcodes are an essential tool in retail and logistics. There are several types, each with its own characteristics and uses. In this complete guide, we’ll explore the main types of barcodes and help you choose the one that best fits your needs.
What is a barcode?
A barcode is a graphic representation of numeric or alphanumeric information that is read with a scanner. Barcodes make it easier to track and identify products, as well as to automate processes across many different sectors.
The main types of barcodes
There are two broad categories of barcodes: linear and two-dimensional (2D). Below, we’ll look at the most common types within each category.

Linear barcodes (1D):
EAN barcode (European Article Number):

This is one of the most widely used barcodes in Europe. It’s commonly used in supermarkets, where checkout usually needs to be very fast. These codes produce fewer read errors than other alternatives. Product packaging typically carries the European Article Number (EAN), or the GTIN (Global Trade Item Number), printed and encoded as a barcode.
It’s made up of the country code, manufacturer code, product code and a check digit.
There are two versions (a long one and a short one):
- EAN-13 (13 digits): This is the standard EAN version.
- EAN-8 (8 digits): Typically used for small products.
The standard barcode can be enlarged or reduced within a resizing range of 0.8 to 2.0. The width range for the narrow bar is 0.26 to 0.66 mm (0.010″ to 0.026″).
There’s a somewhat peculiar type of EAN code that is commonly used for books:
- ISBN: The barcode is formed from the classification code (categorized by sales subject, publication origin and content) and the price code (before taxes), combined with the ISBN.
UPC barcode (Universal Product Code):

Widely used in retail, especially in North America. Europe’s EAN and Japan’s JAN are both based on the UPC.
UPC-A is used only in the U.S. and Canada and does not include a country code. Instead, the first digit, called the number system character (NS), defines the content of the information.
There are also two versions here:
- UPC-A or UPC-12 (standard 12-digit version)
- UPC-E (reduced 6-digit version)
ITF (Interleaved Two of Five)

It’s widely used as the standard distribution code printed on corrugated cardboard boxes. There are several types called “2 of 5”, as shown below. They all represent a character using the same composition, which consists of 2 wide bars (spaces) out of 5 bars (spaces). Although the composition is similar, the code is completely different:
- Interleaved “2 of 5” (ITF): This is the standard version of this family of codes.
- Industrial “2 of 5”: In the past, this code was used in industrial applications. Because it assigns information only to bars, not to spaces, the code size increases. It’s no longer used in many areas today, except for distribution management.
- Matrix “2 of 5”: This code differs from Industrial “2 of 5” because both bars and spaces carry information.
- COOP “2 of 5”: This code is used in a consumer cooperative (co-op) organization and is called the COOP code.
- IATA: This code is used for air cargo management by IATA (International Air Transport Association).
Because ITF is a barcode with very high data density, it offers the following characteristics:
- The label size can be smaller than that of other codes with the same number of digits. This makes it effective for printing barcodes in small spaces.
- It can hold more data than other codes at the same label size. (The number of digits can be increased.)
- A wider bar width is possible if the label size and number of digits stay the same. The wider the bars, the easier they are for the barcode reader to read. It can also be read from a greater distance.
- While ITF has many advantages, it also has the drawback of a possible “read skip” due to its composition.
CODE 39

Code 39 is one of the oldest and most widely used alphanumeric barcodes across various industries. The biggest advantage of this code is the wide range of characters and combinations it offers. It supports numeric values, letters of the alphabet and even symbols (comma, period, space, $, /, +, %). Its main drawback is its low tolerance and low information density.
Codabar

Codabar is a numeric code with 6 additional special characters (0..9 as well as – : / . +). Each Codabar character is represented by 7 elements (4 bars, 3 spaces). This code’s information density is fairly low.
It’s widely used for applications that require serial numbers, such as blood bank management, receipts for door-to-door delivery services and membership cards.
CODE 128

Code 128 is a highly versatile type of code capable of encoding all ASCII characters. It’s commonly used in logistics and transport.
Because it can represent all characters (except Japanese kanji, hiragana and katakana) that you can type on a computer keyboard, it’s a computer-friendly barcode.
Since CODE 128 uses 4 different bar sizes, it requires printers with high print quality. CODE 128 is not suitable for printing with dot-matrix or FA inkjet printers, nor for flexographic printing on corrugated cardboard.
Two-dimensional barcodes (2D)
QR code (Quick Response)

Very popular in marketing, advertising and mobile apps, since it can store a large amount of information and links to websites. Most modern smartphones come with the ability to scan these codes using the device’s camera, which makes them very accessible to consumers.
Data Matrix

This is a type of code widely used in manufacturing and logistics, especially for labeling electronic components and pharmaceutical products. It can hold a large amount of data in a small space.
Unlike linear barcodes, such as the UPC or EAN barcode, a Data Matrix code has a two-dimensional structure. This means it can store information in both the horizontal and the vertical direction.
It consists of 4 main components:
- Data region: The area that contains all the encoded information.
- Solid border line (finder pattern): This is the corner represented by an unbroken line, normally aligned to the left and bottom of the data area. It’s used to detect the code and its location during scanning.
- Open border line (timing pattern): This is the corner opposite the “solid border line”. These lines (top and right) alternate between white and black dots, which makes them open lines. They’re used to determine rows and columns during scanning.
- Quiet zone: This is the area surrounding the code. This margin must be at least as wide as one column/row or one dot of the code.
The size of a Data Matrix code can vary depending on how much information you want to store. It can range from just a few cells to thousands of cells. The most common size is between 10×10 and 144×144 cells.
Thanks to its two-dimensional structure, Data Matrix codes can store more information than linear barcodes. How much information it can hold depends on the size of the code and the type of data being encoded.
Data Matrix codes usually incorporate error-correction techniques to ensure accurate reading, even if parts of the code are damaged or illegible. This makes Data Matrix codes more robust and reliable.
Despite their ability to store a large amount of information, Data Matrix codes take up relatively little physical space. This makes them ideal for printing on labels, packaging or small surfaces.
PDF417

Designed to store large amounts of data, including text, numbers and binary files. Common on IDs, such as driver’s licenses and passports.
PDF417 codes don’t have a fixed, predefined length. They can adapt to different data lengths, since they can expand or contract as needed. In addition, data density can be adjusted to optimize readability and the space the code takes up.
PDF417 codes are used in a wide variety of applications, such as package transport and tracking, transit tickets, ID cards, inventory management and mobile payment systems.
Aztec

Aztec codes are another type of two-dimensional barcode used to store information in the form of dot and bar patterns.
They have a compact structure that lets them take up less physical space than other two-dimensional barcodes. This makes them well suited to applications where space is limited.
Aztec codes are made up of a series of concentric rings around a central point. These rings hold the encoded information in the form of dot and bar patterns. The number of rings and the information density can vary according to the encoding needs.
These codes are designed to be resistant to errors and damage. They incorporate error-correction techniques that keep the code readable even if some parts of it are damaged. This improves reading reliability and resistance to adverse conditions.
Easily create barcodes for your products and optimize your inventory with Stockagile.

How to choose the right barcode for your needs?
When selecting a barcode, keep the following factors in mind:
- Type of information: consider what kind of data you want to store (numeric, alphanumeric, binary) and how much of it.
- Compatibility: make sure the barcode is compatible with the scanners and systems used in your industry or region.
- Size and space: some barcodes require more space than others. Choose a type that fits the size of your labels and products.
- Durability: in demanding environments, such as logistics and manufacturing, you may need barcodes that are more resistant to dirt and wear.
- Industry standards: research the standards and regulations in your sector before deciding which barcode to use.
Conclusion
Barcodes are fundamental to retail, logistics and product identification. There are many types of barcodes, each with its own characteristics and applications. When choosing the right barcode, consider factors such as the type of information, compatibility, size and the regulations in your industry. We hope this guide has given you valuable insight to make an informed decision.