Bar Code 1®
A Web Of Information About Bar Code
BarCode 1 Code 39 Page









[eLabeling.com
This Visit Brought To You By
[BarCode 1 Sponsor]


Code 38 sample barcode labelAll About Code 39 Barcode

Code 39 (also called Code 3 of 9) is an alphanumeric bar code. The symbol can be as long as necessary to store the encoded data. It is designed to encode 26 uppercase letters, 10 digits and 7 special characters. It can be extended to code all 128 ASCII characters by using a two character coding scheme.

Each data character encoded in a Code 39 symbol is made up of 5 bars and 4 spaces for a total of 9 elements. Each bar or space is either "wide" or "narrow" and 3 out of the 9 elements are always wide. That's what gave the code its other name - Code 3 of 9.

The symbol includes a quiet zone (10 x-dimensions or 0.10 inches which every is greater), the start character "*", the encoded data, the stop character "*", and a trailing quiet zone (10 x-dimensions or 0.10 inches which ever is greater). The asterisk is only used as a start and stop code.

The X-dimension is the width of the smallest element in a bar code symbol. The minimum X-dimension for an "open system" (a bar code label that will be read by scanners from outside your company) is 7.5 mils (a mil is 1/1000 inch) or 0.19 mm. The "wide" element is a multiple of the "narrow" element and this multiple must remain the same throughout the symbol. This multiple can range between 2.0 and 3.0 if the narrow element is greater than 20 mils. If the narrow element is less than 20 mils, the multiple can only range between 2.0 and 2.2.

The height of the bars must be at least .15 times the symbol's length or .25 inches, whichever is larger. The overall length of the symbol is given by the equation:

L = (C + 2)(3N + 6)X + (C + 1)I

where

L = length of symbol (not counting quiet zone, dimension will be in mils)
C = number of data characters
X = X-dimension (width of the smallest element in mils.)
N = wide-to-narrow multiple(use 3.0 if your code has a 3 to 1 ratio, etc.)
I = intercharacter gap width

Note that the maximum value (based on the Code 39 specification) for I is 5.3X for X less than 10 mils. If X is 10 mils or greater, the value of I is 3X or 53 mils, whichever is greater. However, for good quality printers, I often equals X. I, strictly speaking, equals X-t where t is the print tolerance in mils. If you do not know the actual value for t, you can calculate the length using the maximum value for I and calculate the minimum value setting I=X.

This calculator will show you the length of a Code 39 bar code given the X dimension, wide-to-narrow ratio and total number of data characters. This calculator assumes that the intercharacter gap equals the X-dimension, which is correct for many printers such as laser printers.

Number of
Characters
X-Dimension
(in mils)
Wide To
Narrow Ratio
 
Length
In Inches
Code 39
Length Calculator
=

Code 39 does not normally include a check character, however there is an established check character for applications that need it. The value of each data character is summed up and divided by 43. The remainder is the value of the character to use as the check character. The table of characters does not include the values for each character, but you can find the value by counting from the first character (a value of 0) and counting up to the last character (a value of 42).

Code 39 Table

The table below shows the character set and the bar/space pattern for the character. The "w" indicates a wide element and the "n" indicated a narrow element. Please note that every character starts and ends with a bar.

Char. Pattern
b s b s b s b s b
  Char. Pattern
b s b s b s b s b
  Char. Pattern
b s b s b s b s b
  Char. Pattern
b s b s b s b s b
0 n n n w w n w n n   C w n w n n w n n n   O w n n n w n n w n   - n w n n n n w n w
1 w n n w n n n n w   D n n n n w w n n w   P n n w n w n n w n   . w w n n n n w n n
2 n n w w n n n n w   E w n n n w w n n n   Q n n n n n n w w w   SP n w w n n n w n n
3 w n w w n n n n n   F n n w n w w n n n   R w n n n n n w w n   * n w n n w n w n n
4 n n n w w n n n w   G n n n n n w w n w   S n n w n n n w w n   $ n w n w n w n n n
5 w n n w w n n n n   H w n n n n w w n n   T n n n n w n w w n   / n w n w n n n w n
6 n n w w w n n n n   I n n w n n w w n n   U w w n n n n n n w   + n w n n n w n w n
7 n n n w n n w n w   J n n n n w w w n n   V n w w n n n n n w   % n n n w n w n w n
8 w n n w n n w n n   K w n n n n n n w w   W w w w n n n n n n      
9 n n w w n n w n n   L n n w n n n n w w   X n w n n w n n n w      
A w n n n n w n n w   M w n w n n n n w n Y w w n n w n n n n      
B n n w n n w n n w   N n n n n w n n w w   Z n w w n w n n n n      

More Information

Altek Instruments based in the UK also has pages with Code 39 specifications. Here is a list of what they have:

You can purchase complete, official specifications from the following organizations:

Barcode Mill from Altek Instruments allows you to issue unique, identifiable documents from your own web site, dynamically and in real time! This service can produce Code 39 and other codes.

There are many shareware, freeware and demoware programs on the BarCode 1 Software Page for printing Code 39.


BarCode 1 is a registered trademark of Adams Communications.
Send comments and questions by e-mail to Russ Adams