Types of barcodes and their usage

Barcodes have been around for more than 50 years now and have since become essential tools for data storage. They first gained traction with the use of UPC and EAN codes on products, making supermarket checkouts much faster. Since then, a lot of different barcode types have emerged, with around 30 of the most important variants being used all around the world.

The different barcode types can be categorized as one-dimensional (1D) and two-dimensional (2D). Currently, even three-dimensional (3D) symbologies are being tested by different industries.

While one-dimensional barcodes consist only of lines and are usually scanned horizontally with laser scanners, two-dimensional codes make use of vertical space as well and can only be scanned with devices that contain a camera, such as imager scanners or smartphones. In this article, you will discover the most popular barcode types and their characteristics.

One-dimensional (1D) barcodes / linear barcodes

One-dimensional (1D) barcodes or linear barcodes example

One-dimensional barcodes can only hold a very limited amount of data encoded by lines of varying widths and the spaces between them (hence they are also called linear barcodes). Since 1D barcodes can be detected by optical laser scanners, which are less costly than imager scanners, they are widely used in different industries. Of course, if your device is capable of scanning two-dimensional codes like QR, it can scan 1D barcodes as well. Your smartphone camera might actually have this functionality built in already. For commercial use, a powerful barcode scanning software is the key to efficient workflows in many different areas, be it retail, logistics, insurance, or healthcare.

Code 39

Example of Code 39
  • Type: Lines with two different widths
  • Max. amount of characters: Variable
  • Common usage: Industrial
  • ISO/IEC certification: ISO/IEC 16388

Learn more about Code 39

One of the earliest examples of linear barcodes, Code 39 can only encode digits, upper-case alphabetical characters, and some special characters. It takes up quite a bit of space, which makes it unsuitable for smaller objects. This was rectified with the introduction of Code 128.

Code 128

Example of Code 128
  • Type: Lines with different widths
  • Max. amount of characters: Variable
  • Common usage: Commonly used in all industries
  • ISO/IEC certification: ISO/IEC 15417

Learn more about Code 128

A big improvement over its predecessors, Code 128 can encode the entire ASCII character set and always includes a check digit. It comprises more data while taking up less space and is widely used in the transportation of goods.

GS1–128

Example of GS1–128 barcode

Learn more about GS1-128

The GS1 barcode is a substandard of Code 128 and was heavily adopted by the industry, since it connects the data structure (GS1) with a data carrier (Code 128), encoding things like order numbers, weights, manufacturing dates, expiration dates, and storage location numbers.

EAN (European Article Number)

Example of EAN code
  • Type: Lines with different widths
  • Max. amount of characters: 8 or 13 digits
  • Common usage: Retail
  • ISO/IEC certification: ISO/IEC 15420

Learn more about EAN

A barcode familiar to European readers, EAN is widely used in the retail sector. It can encode up to 13 digits and is used for the International Standard Book Number (ISBN). The UPC (Universal Product Code) can be thought of as an equivalent primarily used North America. Both EAN and UPC are defined as GS1 standards.

Two-dimensional (2D) barcodes / matrix codes

Examples of 2D barcodes

Two-dimensional barcodes consist of a grid of pixels that can have either an on (black) or off (white) state. These pixels usually have a fixed width and height. A visual anchor, called a marker or symbology, makes it easier for the reading devices to detect the code. An example of this are the corners of a QR code. Other types of markers include the central squares of the Aztec code or the black lines of the Data Matrix code.

Since 2D codes are scanned horizontally and vertically (hence two-dimensional), they can store more data while using less space and have a high fault tolerance. This means that they provide accurate data, even in less than ideal lighting conditions or if the code itself is damaged. Unfortunately, 2D codes cannot be read by the laser scanners used for 1D barcodes, so an imager scanner is required instead.

PDF417

Example of PDF417 code

Learn more about PDF417

Unlike most 2D barcodes, PDF417 codes are actually multiple linear barcodes stacked on top of each other. They are used by the United States Postal Service for postage and by the Department of Homeland Security for driver’s licenses and identification cards.

PDF417 codes consist of a start pattern (left) and end pattern (right), with the information itself encoded in the middle section. The dimensions of the barcode are variable, making it very versatile.

Data Matrix

Example of Data Matrix code
  • Type: Pixel matrix with an L-shaped border as a marker
  • Max. amount of characters: 3116
  • Common usage: Aerospace, automotive, electronics
  • ISO/IEC certification: ISO/IEC 16022

Learn more about Data Matrix

A two-dimensional code consisting of black (on) and white (off) cells that comprise the eponymous matrix. The dark, L-shaped border defines the code’s orientation, while the alternating patterns on the opposite sides enumerate the rows and columns. Depending on its size, it can store more than 2000 characters, which means that a relatively large amount of data can be stored on a very small area. Applied through permanent marking, the code can help to identify spare parts throughout their whole lifespan.

Aztec Code

Example of Aztec Code
  • Type: Pixel matrix with a marker in the center
  • Max. amount of characters: 3832
  • Common usage: Transportation, healthcare
  • ISO/IEC certification: ISO/IEC 24778

Learn more about Aztec Code

The Aztec Code derives its name from the square located in the middle, resembling an Aztec pyramid. It eliminates the need for a so-called “quiet zone” around the edges, saving space. Aztec code is read in a spiral pattern starting from the center, making use of the same error-checking procedure as QR codes. It is widely used in public transport, e.g., on the digital train tickets issued by the Deutsche Bahn.

QR Code

Example of QR Code
  • Type: Pixel matrix with markers in the corners
  • Max. amount of characters: 7089
  • Common usage: Marketing, public transport, package delivery
  • ISO/IEC certification: ISO/IEC 18004

Learn more about QR Code

This barcode has become increasingly widespread with the rising popularity of smartphones and is easily recognizable by its three squares communicating the position to the scanning device. With just one scan, users can quickly open a website or connect to a wireless network. Recently, QR codes have also been used to encode information on Covid-19 vaccination certificates. Thanks to Reed-Solomon error correction, QR codes scan correctly even if a significant part of the matrix is missing, making them a reliable choice for ticketing and similar use cases.

Other types of 2D barcodes

Since two-dimensional barcodes have not been around for as long as their one-dimensional counterparts, the number of different variations to the pixel matrix layout is still relatively small. However, there exist some very specific use cases worth mentioning: The Swiss QR Code has recently been introduced in Switzerland as a standard to encode invoices. Financial transactions within the EU can be processed rapidly via GiroCodes. And the British Royal Mail uses its own version of the Data Matrix to issue machine-readable post stamps. Some codes are even being embossed onto hard surfaces, adding an additional dimension and paving the way for 3D barcodes. It will be interesting to see which kinds of use cases for barcodes will arise in the future.

Examples of other types of 2D barcodes

If you want to implement the Scanbot Barcode Scanner SDK into your workflow, don’t hesitate to contact us. We’d love to bring your ideas to life. Let’s talk.

Developers, ready to get started?

Adding our free trial to your app is easy. Download the Scanbot SDK now and discover the power of mobile data capture.

Try it