Product Code Database
Example Keywords: - $14
   » » Wiki: Code 39
Tag Wiki 'Code 39'.
Code 39 (also known as Alpha39, Code 3 of 9, Code 3/9, Type 39, USS Code 39, or USD-3) is a variable length, discrete symbology.

The Code 39 specification defines 43 characters, consisting of uppercase letters (A through Z), numeric digits (0 through 9) and a number of special characters (-, ., $, /, , %, and space). An additional character (denoted '*') is used for both start and stop delimiters. Each character is composed of nine elements: five bars and four spaces. Three of the nine elements in each character are wide (binary value 1), and six elements are narrow (binary value 0). The width ratio between narrow and wide is not critical, and may be chosen between 1:2 and 1:3.

The barcode itself does not contain a check digit (in contrast to—for instance—), but it can be considered self-checking on the grounds that a single erroneously interpreted bar cannot generate another valid character. Possibly the most serious drawback of Code 39 is its low data density: It requires more space to encode data in Code 39 than, for example, in Code 128. This means that very small goods cannot be labeled with a Code 39 based barcode. However, Code 39 is still widely usedAs one example of an international standard, see and can be decoded with virtually any . One advantage of Code 39 is that since there is no need to generate a check digit, it can easily be integrated into existing printing system by adding a barcode font to the system or printer and then printing the raw data in that font.

Code 39 was developed by and Ray Stevens of in 1974. Their original design included two wide bars and one wide space in each character, resulting in 40 possible characters. Setting aside one of these characters as a start and stop pattern left 39 characters, which was the origin of the name Code 39. Four punctuation characters were later added, using no wide bars and three wide spaces, expanding the character set to 43 characters. Code 39 was later standardised as MH 10.8 M-1983 and MIL-STD-1189. MIL-STD-1189 has been cancelled and replaced by ANSI/AIM BC1/1995, Uniform Symbology Specification — Code 39.

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. This code is traditionally mapped to the * character in barcode and will often appear with the human-readable representation alongside the barcode.

As a generality, the location of the two wide bars can be considered to encode a number between 1 and 10, and the location of the wide space (which has four possible positions) can be considered to classify the character into one of four groups (from left to right): Letters( 30) (U–Z), Digits( 0) (1–9,0), Letters( 10) (A–J), and Letters( 20) (K–T). For example, the letter P (being the 16th letter of the alphabet) has its bars aligned to represent the number 6, and the space in the far right position to select the group Letters( 20).

When represented as a digit, the number "10" (4 7=>11 will be 10) is used to encode the number zero. Because there are only six letters in the Letters( 30) group (letters 30–35, or U–Z), the other four positions in this group (36–39) are used to represent three symbols (dash, period, space) as well as the start/stop character.

The two wide bars, out of five possible positions, encode a number between 1 and 10 using a with the following numeric equivalence: 1, 2, 4, 7, P. The numbers are summed together. For example, the number 6 is encoded NWWNN, with wide bars occupying the positions for 2 and 4 (2 4=6). The P position stands for parity, and does not add anything to the sum; instead, it contains a wide bar only when encoding numbers that need a single bar (1, 2, 4, and 7), so as to ensure that exactly two of the five positions still contain a wide bar. In the case of NNWWN which is 4 7=>11 it will be assigned to 0 for digit ( 0), and 10 for ( 10 – 30). When encoding the ( 10 to 30) Letters the equation needs a "−1" added so 'A' is WNNNW => 1 10 − 1 => 10 as shown in the table.

The last four characters consist of all narrow bars and three wide spaces. There are four possible positions for the single narrow space.

This table outlines the Code 39 specification. The numeric value assigned to each character (except start/stop) is used in the checksum algorithm described below.

Code 39 characters (and checksum values) !rowspan=2 colspan=2Spaces

Characters are separated by an additional narrow space. For example, the full encoding for the single letter "A", which actually includes the start and stop characters as "*A*", is . The code will not be read properly without these inter-character spaces. Barcode fonts invariably include this space within the glyph for the character.

Code 39 mod 43
Code 39 is sometimes used with an optional 43 . Using it requires this feature to be enabled in the barcode reader. The code with check digit is referred to as Code 39 mod 43.

To compute this, each character is assigned a value. The assignments are listed in the table above, and almost, but not quite, systematic.

Here is how to do the calculation:

  • Take the value (0 through 42) of each character in the barcode excluding start and stop codes.
  • Sum the values.
  • Divide the result by 43.
  • The remainder is the value of the checksum character to be appended.

Full ASCII Code 39
Code 39 is restricted to 43 characters. In Full Code 39 Symbols 0-9, A-Z, ".", "-" and space are the same as their representations in Code 39. Lower case letters, additional characters and control characters are represented by sequences of two characters of Code 39.
Code Details
Encoding   Encoding   Encoding   Encoding
%U   space   %V   %W
$A   /A   A   A
$B   /B   B   B
$C   /C   C   C
$D   /D   D   D
$E   /E   E   E
$F   /F   F   F
$G   /G   G   G
$H   /H   H   H
$I   /I   I   I
$J   /J   J   J
$K   /K   K   K
$L   /L   L   L
$M   -   M   M
$N   .   N   N
$O   /O   O   O
$P   0   P   P
$Q   1   Q   Q
$R   2   R   R
$S   3   S   S
$T   4   T   T
$U   5   U   U
$V   6   V   V
$W   7   W   W
$X   8   X   X
$Y   9   Y   Y
$Z   /Z   Z   Z
%A   %F   %K   %P
%B   %G   %L   %Q
%C   %H   %M   %R
%D   %I   %N   %S
%E   %J   %O   %T, %X, %Y, %Z

External links

Page 1 of 1
Upload Media
Page 1 of 1


Social:  .. 
Content:  ..   .. 
Pages:  ..   .. 
Items:  .. 


General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 


Page:  .. 
Summary:  .. 
499 Tags
10/10 Page Rank
5903 Page Refs
1s Time