Code 39 Barcode FAQ

What is Code 39 barcode, checksum digit, text character set, module size, reading Code 39

Code 39 Barcode Introduction

What is Code 39 barcode?

Barcode Code 39 (also known as "Code 3 of 9", "USS Code 39", "Code 3/9", "USD-3", "Alpha39", "Type 39") is a barcode symbology that can encode uppercase letters (A through Z), digits (0 through 9) and a handful of special characters like the $ sign.

What are Code 39 standards?

Code 39 barcode specification is defined in ISO/IEC 16388. The specification full name is "ISO/IEC 16388 Information technology - Automatic identification and data capture techniques - Code 39 bar code symbology specification".

The new version of Code 39 specification "ISO/IEC PRF 16388" is under development by Technical Committee "ISO/IEC JTC 1/SC 31"

There are two standards based on Code 3 of 9 specification.

  • HIBC Bar Code (Health Industry Barcode) is a solution for world wide product tracking in the health industry. Besides Code 39, HIBC will also use Code 128, EAN 13, and EAN 128
  • LOGMARS is a barcode standard based on the Code 39 specification. LOGMARS stands for Logistics Applications of Automated Marking and Reading Symbols, and it is used by the U.S. government for the military goods supply.

What is Code 39 used for?

Code 39 is a common linear barcode type used in:

  • Inventory tracking
  • Postal services
  • Health sector
  • Aviation industry
  • Government (such as US Defense department is using LOGMARS for the military equipments)

Code 39 Barcode Symbol Structure

Code 39 barcode symbols shall comprise the following parts:

  1. leading quiet zone
  2. start character
  3. code 39 character set with check digit, if used
  4. stop character
  5. trailing quiet zone

Note: characters are separated by a space (the intercharacter gap).

Start/Stop Characters

Code 39 uses asterisk character (*) as Start and Stop characters, and it should not be part of the Code 39 barcode data. In the barcode Human-readable interpretation, it can display or hide start/stop characters (asterisk *).

Example: Code 39 barcode with start/stop displayed

Code 39 Encoding Character Set

Code 39 barcode standard mode supports 43 characters, including

  • Numeric digit: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Uppercase letters (A - Z)
  • Special characters: - (Dash), $ (Dollar), % (Percentage), (Space), . (Point), / (Slash), + (Plus)
  • Start/Stop character

Code 39 Full ASCII

Code 39 supports encoding the full 128 character ASCII character set in accordance with ISO 646 IRV.

In full ASCII code 39 symbols, regular mode supported chars (0-9, A-Z, ".", "-" and space) are the same as their representations in Code 39. Lower case letters, additional punctuation characters and control characters are represented by sequences of two characters of Code 39.

Table-1: Encode the Full ASCII character set in Code 39

SOH $A ! /A A A a +A
STX $B " /B B B b +B
ETX $C # /C C C c +C
EOT $D $ /D D D d +D
ENQ $E % /E E E e +E
ACK $F & /F F F f +F
BEL $G ' /G G G g +G
BS $H ( /H H H h +H
HT $I ) /I I I i +I
LF $J * /J J J j +J
VT $K + /K K K k +K
FF $L , /L L L l +L
CR $M - - M M m +M
SO $N . . N N n +N
SI $O / /O O O o +O
DLE $P 0 0 P P p +P
DC1 $Q 1 1 Q Q q +Q
DC2 $R 2 2 R R r +R
DC3 $S 3 3 S S s +S
DC4 $T 4 4 T T t +T
NAK $U 5 5 U U u +U
SYN $V 6 6 V V v +V
ETB $W 7 7 W W w +W
CAN $X 8 8 X X x +X
EM $Y 9 9 Y Y y +Y
SUB $Z : /Z Z Z z +Z
ESC %A ; %F [ %K { %P
FS %B < %G \ %L | %Q
GS %C = %H ] %M } %R
RS %D > %I ^ %N ~ %S
US %E ? %J _ %O DEL %T or %X or %Y or %Z

How many characters in a Code 39 barcode?

  • Code 39 standard mode: it supports 43 characters.
  • Code 39 Full ASCII mode: it supports 128 characters.

What is the Code 39 barcode minimum length?

There are no rigid requirements for Code 39 barcode data size.

Some barcode scanners will not scan code 39 for less than 4 characters by default. You need configure barcode scanner settings to minimize the length of code 39 characters to 0.

Code 39 Check Digit Calculator with example

You could view the Code 39 check digit calculator in video at How to calculate Code 39 barcode check digit in video

Code 39 text label

Code 39 barcode text label is also known as human-readable interpretation. It should normally be printed with the Code 39 symbol.

A sample Code 39 image without human-readable interpretation printed.

Code 39 start/stop characters my be printed. A sample Code 39 image without start/stop characters printed.

Code 39 Barcode Dimension Size

Code 39 barcode uses the following dimension settings:

  • Width of narrow element (X): the mimumum bar width is defined by the application specification
  • Wide/narrow ratio (N): the valid value is from 2.0 to 3.0 inclusive.
  • Width of intercharacter gap (I):
    • minimum gap is equal to X
    • maximum: for X < 0.287mm, is 5.3X; for X >= 0.287mm, is 1.52mm or 3X, whichever is greater.
  • Quiet zone: the minimum width of quiet zone is 10X.
  • Bar code height: the minimum height is 5.0mm or 15% of symbol width (excluding quiet zones), whichever is greater.

Code 39 barcode dimension size calculator

The width of a Code 39 barcode, including quiet zones, can be calculated from the following expression:

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


  • W: is the barcode width
  • C: is the number of Code 39 data characters (including the check digit if used)
  • N: is the width/narrow ratio
  • X: is the width of a narrow element
  • I: is the width of the intercharacter gap
  • Q: is the width of the quiet zone

Reading & decoding Code 39 barcode image

To be scannable by barcode scanner device or barcode reader software, you need follow the guide in the barcode specification. Here are some:

  • Code 39 wide/narow bar ratio should be 2.0 and 3.0
  • The minium of intercharacter gap is equal to bar width
  • Minium width of quite zone should be equal or greater than 10 * bar width

OnBarcode provides several barcode reading solutions for you.

Code 39 Software & Components

OnBarcode also provides high quality Code 39 barcode generator / reader library, component and SDK for you.

Terms of Use | Privacy Policy
Copyright © . All rights reserved.