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.

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 KeepAutomation.com provides multiple Code 39 related products to enable Code 39 to be created in different platforms.

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: