Code 39


Code 39 is a variable-length barcode type introduced in 1974 by Intermec Corporation. It was the first specification that allowed storing not only numerical digits but also alphabetic symbols. Its encoding set includes 43 symbols, i.e. uppercase English letters (A-Z), numerical digits, and several special characters. Each symbol gets encoded in a set of five bars and four spaces. It enables self-checking and thus it does not require obligatory checksum controls. Code 39 has been widely employed in various industries, including the LOGMARS system developed by the US military.

Code 39 Barcode

Usage Scenarios

Despite being introduced in the mid-’70s, Code 39 remains one of the frequently widely used barcode types even nowadays. It was widely implemented in various applications, such as inventory management, digitalization of name badges, automotive and medical equipment production, airplane construction, defense projects (i.e. LOGMARS), healthcare sector, transportation, and assembly tracking.


Encoding Character Set

Code 39 enables encoding characters from the 43-character and 128-character ASCII sets, including uppercase English letters, numerical digits, and special symbols (space, ‘.’, ‘-’, ‘/’, ‘%’, ‘+’, ' * ‘, and ‘$’). Symbol ' * ' serves to denote start and stop digits.

Barcode Structure

Each Code 39 data symbol is encoded using five bars and four spaces so that three of them are wide and six are narrow.
The following structure is supported:

  • Starting quiet zone
  • Start symbol
  • One or more pairs of characters (an optional check digit may be added)
  • Stop symbol
  • Ending quiet zone
  • One-module wide spaces separating symbols within a barcode

Size Dimensions

To scan Code 38 barcodes manually, it is recommended to set the minimum height to 5.0 mm or 15% of the width. The size of quiet zones should be 10 times wider than the current X-dimension. This standard allows generating labels of different proportions, i.e. 2:1.X or 3:1.X. The larger is the selected proportion, the larger gets the printed label; however, this also improves readability.

Encoding Capacity and Data Density

Code 39 allows generating barcodes of variable length; its average data capacity varies from 20 to 23 alphanumerical characters. Even though it enables encoding the entire ASCII set including 128 symbols, this leads to limitations in terms of density. This happens because symbols from the full ASCII set need to be encoded in two digits and thus occupy a larger space.

Checksum Controls

Code 39 does not require setting obligatory checksum controls and thus does not provide high recognition precision. It allows adding an optional check digit computed using the modulo 43 algorithm.

Advantages and Limitations

Code 39 can be applied to the majority of industrial needs. Such barcodes can be scanned and decoded by most scanners existing in the market. Main limitations of this type are quite low data density and inability to verify the correctness of recognition as it does not include default checksum controls. Low data density means that the greater is the amount of information to be encoded, the larger is the size of a barcode label. Code 39 is not applicable in situations when space limitations are critical. Like other 1D barcodes, Code 39 labels can be easily corrupted and become unreadable as a result of ink spread while printing.

How to Generate and Read Code 39 Barcodes

Generation Code Samples

Recognition Code Samples