Code 39 Barcode Specification

   Minimize

Introduction

Code 39 (also known as USS Code 39, Code three of nine) is the first alpha-numeric symbology developed to be used in non-retail environment. It is widely used to code alphanumeric information, such as the model number etc.

Code39 is designed to encode 26 upper case letters, 10 digits and 7 special characters:

A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

-, ., *, $, /, +, %, SPACE.

It Is called code 39 or three of nine because each character encoded is made up of 5 bars and 4 spaces for a total of 9 elements and 3 out of 9 element are always wide.

A complete code 39 barcode must include a start character * and a stop character *. In this way code 39 is self-checking.

The height of the bars must be at least 0.15 times of the symbol’s length or 0.25 inches, whichever is larger.

Code 39 is a discrete symbology. Two adjacent characters are separated by an inter-character gap. To have the good barcode quality, the width of the inter-character gap usually equals to the width of the narrowest element, called X.

Code39 requires a starting quiet zone with the minimum 10 times of X dimension or 0.10 inch whichever is greater. The same width requirement applies to the trailing quiet zone.

Encoding

Code 39 Mod 43 – In applications that require very high level of accuracy a modulo 43 check sum digit is appended to the last character. Also known as HIBC and LOGMARS.

Code 39 Extended – this encoding variant allows the full ASCII table, 128 characters to be encoded.

ASCII

ENCODING

ASCII

ENCODING

ASCII

ENCODING

ASCII

ENCODING

NUL

%U

SP

Space

@

%V

`

%W

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

YS

%E

?

%J

_

%O

DEL

%T, %X, %Y, %Z

 

Barcode Structure 

A typical code 39 barcode has the following structure:

§  A start character – the asterisk(*)

§  Message encoded

§  A stop character – the second asterisk(*)

Check Digit Calculation

To calculate the optional checksum digit, follow the following steps.

1.     Take the value (0 through 42) of each character in the barcode. The start and stop characters are not included in the checksum calculation.

2.     Sum the value of each of the values of each of the characters described in step 1.

3.     Divide the result from step 2 by 43.

4.     The remainder from the division in step 3 is the checksum character that will be appended to the data message before the stop character.