Home Page Code 39 Barcode Specification shopping cart
site currency

currency info
spacer Home spacer Barcode Mill spacer Barcode Fonts spacer How to order spacer Email us spacer

Altek Logo
Code 39 Specification

Code 39 (sometimes called Code 3 from 9) is a discrete barcode. This means that a fixed pattern of bars represents a single character.

Each character is made up of 9 bars - 3 of which are wider than the others. (In this context a bar can be the printed black bar or the white space between the bars.) A single character therefore consists of 5 black bars and 4 white bars.

The ratio of the bar widths can range from 2.2:1 to 3:1. To read a barcode reliably the decoder must be able to differentiate between the wide and narrow bars. In practice it is better to use barcodes close to the 3:1 ratio which allows nearly a 50% barwidth error to occur before ambiguity occurs.

The space between each barcode character is called 'The intercharacter gap'. Its width is undefined but is usually equivalent to a narrow white bar.

The widths of the wide and narrow sets of elements should all be the same but in practice most printing processes incur 'ink spread'. This widens the bars at the expense of the spaces. This effect is most noticable on narrow elements sometimes making the barcodes very difficult to scan with some decoders.

At Altek we believe that well designed fonts and print programs should take this into account (many do not). All decoders using Altek decoding algorithms measure the barwidths separate from the spacewidths. This is one reason why the Altek decoders can often make good scans where others fail.

The Code 39 barcode symbology supports 43 characters plus an additional character used as a delimiter or start/stop character. The start/stop character always occurs as the first and last character in a complete barcode and is represented in the human readable text by the * character.

The 43 character set includes the following:


Note that the alphabetic characters are all upper case. If you wish to use lower case letters or other ASCII characters then Extended Code 39 must be used.

Bar Width Configuration Table

This table shows the bar configuration for each character in the Code 39 set. Note that the * character is used only for the start/stop character. It must be the first and last character appearing in the complete barcode. (Decoders do not usually transmit this character as part of the data string.)

Check Digit

A check digit is not often used with Code 39 but a few critical applications may require one. The check digit is the modulus 43 sum of all the character values in the message. It is printed as the last data character. The following table shows the character and value used for the calculation...
  Char Value        Char Value         Char Value         Char Value
   0     0           B    11            M    22            X    33   
   1     1           C    12            N    23            Y    34
   2     2           D    13            O    24            Z    35
   3     3           E    14            P    25            -    36
   4     4           F    15            Q    26            .    37
   5     5           G    16            R    27          space  38
   6     6           H    17            S    28            $    39
   7     7           I    18            T    29            /    40
   8     8           J    19            U    30            +    41
   9     9           K    20            V    31            %    42
   A    10           L    21            W    32

Example calculation

Data: 12345ABCDE/
Sum of values: 1 + 2 + 3 + 4 + 5 + 10 + 11 + 12 + 13 + 14 + 40 = 115
115 divided by 43 = 2 remainder 29. Therefore T is the check digit.
Data with check digit: 12345ABCDE/T

We have created an innovative Web based solution to the printing of Code 39 and other barcodes. Barcode Mill prints barcodes on Web pages which may be scanned when the page is printed out. Alternatively the barcode can be cut 'n' pasted to a graphics package.

For high quality machine readable TrueType Code 39 Fonts visit our ABC Fonts website.

Altek Instruments Ltd have a range of products designed for the data collection/automatic ID industries.

Top Home            © Lee Allen,2018