Code 39 - barKoder Barcode Scanner SDK

Scanning VIN's for mobile apps made easy with barKoder Barcode Decoder SDK

1D Barkodes Generate Code-39

1D 2D

What are Code 39 barcodes & what are their specifications


Code 39, also known as 3 of 9 Code and USD-3, is a popular alpha-numeric barcode symbology that is widely used across the world. It is a linear barcode symbology, which means that the code is made up of a series of bars of varying widths and spaces, read from left to right, that represent the encoded data. Code 39 is a variable length symbology, which means that the number of characters in the code can vary depending on the data being encoded.

One of the key features of Code 39 is its use of 43 characters, including the standard 26 capital letters of the alphabet, the 10 digits from 0 to 9, and a handful of special characters (-, ., $, /, +, %, and space).  This allows Code 39 to encode a wide range of data, including letters, numbers, and symbols, making it an ideal choice for a variety of applications. The * character presented below is not a true encodable character, but is the start and stop symbol for Code 39. The asymmetry of the symbol allows the reader to determine the direction of the barcode being scanned. Code 39 is often used in industrial and government organizations, due to its high level of reliability and versatility. It is widely used in the automotive industry, where it is used to track parts and components, as well as in the healthcare industry, where it is used to track medical supplies and equipment. The code is also commonly used by government organizations, including the military and law enforcement, to track and identify items.


Sample image of code 39 code

One of the main advantages of Code 39 is its simplicity and ease of use. Unlike other barcode symbologies, Code 39 does not require a checksum digit, which means that it is easier and faster to encode and read data. This makes it ideal for applications where speed and efficiency are important, such as in the fast-paced environment of a manufacturing plant or warehouse.

Another advantage of Code 39 is its ability to encode data in a compact format. This is because the code only requires a narrow bar and a wide bar to represent each character, rather than multiple bars of different widths and spaces as used in other barcode symbologies. This means that Code 39 can be used to encode a large amount of data in a small amount of space, making it ideal for applications where space is limited, such as on small parts or labels.


Code 39 is also highly flexible, allowing for the use of both human-readable and machine-readable data. This means that the encoded data can be easily read by both people and machines, making it ideal for a wide range of applications. Additionally, Code 39 is easy to implement, as it can be generated using many different types of barcode software and hardware, including handheld barcode scanners and desktop barcode printers. Despite its many advantages, Code 39 is not without its limitations. One of the main disadvantages is that it is not as compact as other barcode symbologies, such as Code 128 or QR Code. This means that it is not as ideal for applications where space is limited, and that it may not be as efficient as other barcode symbologies in terms of encoding and decoding data.




  • Also known as Code 3 of 9, Code 3/9, Alpha39, Type 39, USD-3, or USS Code 39.
  • Discrete barcode symbology with variable length.
  • Can encode 43 alpha-numeric characters.
  • The barcode character set includes the capital letters (A-Z), the numeric (0-9) and special characters (space-+.$/%).
  • Each character consists of 9 elements: 5 bars and 4 spaces.
  • Self-checking barcode but to increase data integrity Mod 43 checksum is often used.
  • Used in various applications especially in non-retail environments.


How can the barKoder SDK help with your Code 39 scanning requirements

The barKoder barcode scanner SDK can empower any enterprise or consumer mobile or desktop app with state-of-the-art barcode scanning functionality with very little integration efforts.

Download the free trial SDK, evaluate barKoder via its Barcode Scanner demo app, explore our documentation hub, blog posts and more.


Code 39 is heavily used for Vehicle Identification Numbers (VIN).

When encoding Vehicle Identification Numbers (VINs) using Code 39, the specifics of the encoding process adhere to the standard rules of the Code 39 barcode symbology. However, it's important to note that the content and structure of VINs themselves follow a specific format defined by international standards. The VIN is a unique code assigned to each motor vehicle, and it typically includes information about the vehicle's make, model, year of manufacture, and other specific details.

Here are the key considerations when using Code 39 for encoding VINs:

  1. Alphanumeric Characters: 
    VINs contain a combination of letters (A-Z) and numbers (0-9). Code 39 is well-suited for encoding alphanumeric characters, as it supports the entire alphanumeric character set.
  2. Start and Stop Characters: 
    Code 39 requires start and stop characters to indicate the beginning and end of the barcode. These characters are typically represented by an asterisk (*) in Code 39. In the context of encoding VINs, the asterisk serves as a delimiter to identify the start and end of the VIN within the barcode.
  3. Check Character (Optional): 
    While not always used, Code 39 can include a check character for error detection. The check character is calculated based on the other characters in the barcode and helps ensure the accuracy of the scanned data. In some cases, a check character may be included in VIN barcodes for added data integrity.
  4. Variable Length: 
    Code 39 does not have a fixed length requirement, and it can accommodate variable-length data. VINs, however, follow a standardized length defined by international regulations. As of my last knowledge update in January 2022, VINs are typically 17 characters long, but it's essential to check the latest regulations as they can evolve over time.
  5. Character Set and Encoding: 
    Code 39 uses a set of bars and spaces to represent each character. Each character is encoded using a unique pattern of bars and spaces. The encoding process involves mapping each alphanumeric character in the VIN to its corresponding Code 39 pattern.
  6. Readable Fonts: 
    When printing Code 39 barcodes for VINs, it's important to use readable fonts and ensure an adequate level of contrast between the bars and spaces. This is crucial for reliable scanning, especially in manufacturing and logistics environments where VINs are frequently scanned.
  7. Industry Standards: 
    The use of Code 39 for VINs aligns with industry standards and practices in the automotive sector. Many systems and processes within the automotive industry are designed to work with Code 39-encoded data.

With barKoder we pride ourselves with exceptional scanning capabilities specifically for VIN barcodes encoded with the code 39 symbology and with using Segment Decoding we can even scan heavily misshaped VIN barcodes. Learn more about our Segment Decoding and VIN scanning.