Barcode Introduction > Code 39
Overview of Code 39
Code 39 is a discrete barcode symbology, which is known as "Code 3/9", "Code 3 of 9", "USS Code 39", "USD-3", "Alpha39", and "Type 39". Some symbologies have a limitation over the length of data while Code 39 is not one of them. The length of data that encoded by a single Code 39 is variable.
Code 39 encodes both numeric and alphabetical characters, comprising uppercase letters (A through Z), numeric digits (0 through 9) and seven special characters (-, ., $, /, +, %, and space).
In addition, there are few restrictions in the application of Code 39. Thus, it is wildly applied in automated administration of industries, books and tickets, etc. And it can be used in informal situations.
Generation of Code 39
Since Code 39 is widely applied in many industries both at home and abroad, our provides multiple Code 39 related products to enable Code 39 to be created in different platforms.
Code 39 Generator for Office Excel - An Office barcode add-in that inserts Code 39 barcode image into Excel

Code 39 Generator for .NET - .NET Component that generates Code 39 for Windows and Web Applications

Code 39 Generator for Winforms - A windows forms development tool for Code 39 barcode image generation

Code 39 Generator for ASP.NET - An ASP.NET SDK to add Code 39 barcode image in ASP.NET projects

Code 39 Generator for Java - Java Class Library that creates Code 39 bar code image generation in Java

Code 39 Generator for Android - Android development tool to make Code 39 in Android Apps
Check Digit Calculation of Code 39
Code 39 is a self-checking barcode, and the checksum digit - Code 39 mod 43 is used to enhance the data security of Code 39. Note that Module 43 Checksum Digit is optional for Code 39. However, Module 43 Checksum Digit is required in many applications, such as LOGMARS (Logistics Applications of Automated Marking and Reading Symbols) and HIBCC (Health Industry Barcode Council).
The concrete calculation of Code 39 is as below:
Data characters C O D E 3 9
Characters values 12 24 13 14 3 9
Sum of values 75
Sum of values 75
Divide by 43 75/43 = 1 reminder 32
Sum of values 75
Character value 32 corresponds to W
Data with symbol check digit CODE39W
Structure of Code 39
A Code 39 barcode symbology consists of five parts: left quiet zone, start character, data characters, stop character and right quiet zone. The asterisk symbol (*), used at the beginning and end of the data, performs as the start and stop character, and they cannot be transmitted by decoder.
Because Code 39 may be of any length, it can freely vary with the needs of users. Its symbol width (W) are determined by several factors, including number of data characters (C), wide to narrow ratio (N), width of a narrow element (X), intercharacter gap (I) and quiet zone (Q) in millimeters. And the width of a code 39 image can be calculated by the following algorithm:
W = (C + 2) (3N + 6) X + (C+1) I + 2Q
  • The width of narrow element (X) can be defined by users
  • The wide to narrow bar ratio (N) is 2:1 to 3:1
  • The minimum width of intercharacter gap (I) is equal to X
  • Each quiet zone (Q) should be at least 10 times the value of narrow bar(X)
Extension Character Set of Code 39
Extended Code 39 is designed to encode more characters, comparing with Code 39, for meeting some specified applications. Extension Character Set of Code 39 includes:
  • Numeric digits (0 - 9)
  • Uppercase letters (A - Z)
  • Lowercase letters (a - z)
  • - (Dash), $ (Dollar), % (Percentage), (Space), . (Point), / (Slash), + (Plus)