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.
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.
Code 39 is a common linear barcode type used in:
Code 39 barcode symbols shall comprise the following parts:
Note: characters are separated by a space (the intercharacter gap).
Code 39 barcode standard mode supports 43 characters, including
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
ASCII | CODE | ASCII | CODE | ASCII | CODE | ASCII | CODE |
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 |
US | %E | ? | %J | _ | %O | DEL | %T or %X or %Y or %Z |
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 does not include a checksum or check digit by default. For applications requiring enhanced data security, the modulo 43 (MOD43) check character may be used as a check digit.
When a checksum or check digit is included in the Code 39 barcode, the following check character algorithm (MOD43) should be used.
For example, calculate the check character for Code 39 data "CODE 39"
Table-2: Code 39 numerical character values for modulo 43 check
Character | Value | Character | Value | Character | Value |
0 | 0 | F | 15 | U | 30 |
1 | 1 | G | 16 | V | 31 |
2 | 2 | H | 17 | W | 32 |
3 | 3 | I | 18 | X | 33 |
4 | 4 | J | 19 | Y | 34 |
5 | 5 | K | 20 | Z | 35 |
6 | 6 | L | 21 | - | 36 |
7 | 7 | M | 22 | . | 37 |
8 | 8 | N | 23 | SPACE | 38 |
9 | 9 | O | 24 | $ | 39 |
A | 10 | P | 25 | / | 40 |
B | 11 | Q | 26 | + | 41 |
C | 12 | R | 27 | % | 42 |
D | 13 | S | 28 | ||
E | 14 | T | 29 |
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 uses the following dimension settings:
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
where
To be scannable by barcode scanner device or barcode reader software, you need follow the guide in the barcode specification. Here are some:
OnBarcode provides several barcode reading solutions for you.
OnBarcode also provides high quality Code 39 barcode generator / reader library, component and SDK for you.