Code 2 of 5 Barcodes

Read, write, and detect over 30 different barcodes with our barcode SDK.

Code 2 of 5

Developed in 1970 by Identicon Corporation and the Computer Identics Corporation in the late 1960s, Code 2 of 5 – also called Industry 2 of 5 – is part of the larger code family known as “2 of 5 interleaved.” Unlike newer barcode formats, Code 2 of 5 encodes all data within bars, using the spaces only to separate the encoded bar data. As a result, this code is inefficient compared to more modern codes which use both bars and blank spaces as part of their encoding symbology. The barcode takes its name from the fact that 2 of every 5 five bars are wide and 3 are narrow.

Code 2 of 5 encodes numeric data only, and most barcode readers will generate an error if any non-numeric characters are included. Code 2 of 5 is also a self-checking barcode, which means no checksum is required. It is possible, however, to include an optional modulo checksum if desired.

Format

The Code 2 of 5 format consists of five key elements:

  • A Leading Quiet Zone
  • One Start Character
  • All Encoded Symbol Data
  • One Stop Character
  • A Closing Quiet Zone

Most Code 2 of 5 formats also include human-readable text below the barcode which displays the encoded digits, but this is not mandatory. The quiet zone of any 2 of 5 barcode should be at least 10x the width of any narrow bars.

Common Use Cases

The most common application of 2 of 5 barcodes is on airline tickets, but these codes are also used by department stores. While these codes are still used by airlines across the world thanks to integrated code reading infrastructure, higher-density options are now preferred by most organizations to improve data encoding and minimize barcode size.