Code 39 Barcodes

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

Code 39

Developed in 1974 by David Allais and Raymond Stevens of Interface Mechanisms, Inc., Code 39 was the first barcode to encode both numeric digits and alphanumeric characters. As a result, it remains one of the most popular barcodes in the world.

Code 39 makes it possible to encode digits 0-9, uppercase letters A-Z, along with six symbols: minus, plus, period, dollar sign, slash, and percent.  Most barcode readers will generate an error if non-allowed symbols are included in Code 39 elements, meaning this code is considered “self-checking” because a single misinterpreted or incorrect bar will not generate the following valid character.

While Code 39 was groundbreaking for its use of both numbers and letters, it takes significantly more space to encode data in Code 39 than newer codes – such as Code 128 – meaning it’s often not possible to use Code 39 for small-space applications. Because the code can be read by virtually any barcode reader, however, it remains popular worldwide.

Format

Code 39 is sometimes called Code 3 of 9 because it uses 5 bars and 4 spaces for a total of nine elements – 3 of which are wide and 6 of which are narrow. Code 39 has six key format elements:

  • A Leading Quiet Zone
  • One Start Character, Typically an Asterisk (*)
  • One or More Symbol Character Pairs
  • One Stop Character, Typically an Asterisk (*)
  • A Trailing Quiet Zone
  • Various One-Module-Wide Intercharacter Spaces that Separate Specific Characters

For accurate scanning, symbols must be at least 5.0 millimeters or 15 percent of existing symbol width. In addition, both start and stop quiet zones must be at least 10x wide where “x” is the width of current character symbols.

Common Use Cases

While other code formats – such as Code 128 – encode data with greater density than Code 39, this barcode type is still widely used by government agencies. Specifically, US Military agencies have used this code across their LOGMARS systems for logistics and automated reporting.

Most human-readable instances of Code 39 will include asterisks at the beginning and end of the code to denote the start and stop points. It’s also worth noting that Code 39 is nearly identical to Code 32, meaning that some barcode scanners may confuse these two types unless readers are set specifically to recognize the code type being used.

Document Barcode