A Closer Look at Code 39
September 18, 2008 5:46 am Barcode Educational Tutorials, Barcode Symbologies
As promised in my Question of the Week, I’m going to take a closer look at Code 39 today. Once again, Code 39 is also known as barcode 39, code 3 of 9, 3 of 9 barcode and more. Code 39 was created in 1975 by Intermec and is still widely used in industrial applications and for internal applications.
Code 39 is capable of encoding uppercase letters A-Z, digits 0-9 and special characters such as SPACE, - (minus), . (period), $ (dollar sign), % (percent), / (slash), + (plus). An Extended Code 39 can also encode additional characters not normally supported by the code, such as lower case letters. This low density symbol requires more space to encode data than the similar Code 128. Also unlike Code 128, Code 39 doesn’t require a check digit because it was designed with character self-checking. Yet Code 39 does have a checksum character for standards that may require it, such as LOGMARS (Logistics Applications of Automated Marking and Reading Symbols). When required, the checksum is calculated using a Modulo 43 calculation and the code is referred to as Code 39 mod 43.
Each Code 39 character is made up of 9 elements, 3 wide and 6 narrow. Therefore, a single character consists of 5 black bars and 4 white spaces. Each symbol includes:
1. Quiet zone the width of at least 10 narrow bars
2. Start character
3. Encoded data
4. Stop character
5. Quiet zone the width of at least 10 narrow bars
Code 39 can be read by nearly every barcode scanner on the market today and is quite popular because of its simplicity and reliable reading results. If you would like more information about barcode software that supports Code 39 or have any additional questions, please feel free to contact me at ehodges@barcode.com.








nen :
Date: October 11, 2008 @ 4:51 pm
how can u tell that the barcode is belong to certain country maid?
what number belongs to certain country?
ANSWER:
Code 39 can be encoded with whatever information a user wants (as long as it’s within the characters that are allowed), so there is no way to tell what country the barcode was produced in. If you’re asking about UPC’s, UPC country codes tell you what country a manufacturer’s unique ID was assigned, but not where a product is made. My post on GEPIR may help you find some information http://www.barcode.com/2008/10/search-for-barcode-information-using-gepir/ Hope this helps!
Margaret :
Date: October 24, 2008 @ 3:25 pm
I discoverd you website just by searching and learned a lot, but not quite enough! Question in e-mail.
Jess :
Date: February 23, 2009 @ 11:27 am
Is there a standard for Code 39 that defines the ratio of height to length? We are creating a custom driver that generates the barcode and we are having a difficult time finding and spec defined by a standard. Any help is appreciated.
Answer
Hi Jess, thanks for your question. Code 39 is designed to encode 26 uppercase letters, 10 digits, and 7 special characters. Each data character encoded in a Code 39 symbol is made up of 5 bars and 4 spaces, for a total of 9 elements. Code 39 also includes a quiet zone, the start character, the encoded data, and the stop character, and a trailing quiet zone.
The X-dimension is the width of the smallest element in a bar code symbol. The minimum x-dimension for a bar code label that will be read by scanners from outside your company is7.5 mils. The wide element is a multiple of the narrow element and 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
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
The maximum value for I is 5.3X if X is less than 10 mils. If X is greater than 10 mils, 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.
Hope this helps! Goodluck with your custom driver!
Reidar :
Date: March 13, 2009 @ 7:32 am
I am having problems encoding just a single letter, e.g. A. I have put in the asterix in front and after (*A*), but my barcode reader will not read it (I have even tried several readers). Is there any special issues concerning single letter coding?
Answer
Hi Reidar,
I would contact your barcode reader’s manufacturer in order to better address this issue. It could be a simple model-specific issue that they would be able to help you with.