↑ Return to Types of Barcodes

Code 128

Code 128

Code 128 is one of the most recently adopted bar code symbologies and certainly one of the most complex.

It takes its name from the number of different characters it may encode – the full 128 ASCII character set (plus other function and special characters). This includes all the number and letter characters as well as punctuation marks and other computer related codes such as LF (Line Feed) and ESC (Escape).

As Code 128 was developed after many of today’s popular symbologies had been in use for some time, its developers (Computer Identics) were able to design a code that was more capable but was also more secure and more compact than the established codes.

Code128

Code 128 uses 3 separate character sets and can switch between them by the use of special shift characters.

Code Set A includes numeric characters, punctuation, upper-case letters and computer related codes

Code Set B is similar to A but does not include the special computer codes but includes lower-case letters.

Code Set C is purely numeric. It encodes numbers in pairs, and therefore uses half the space to represent numeric data that would be taken up if Code Sets A or B were used.

There are 3 different start patterns (A,B & C) which denote which code set is used for the first digits. Thereafter the code set may be changed by the use of the Code A, Code B or Code C characters.

The structure of Code 128 dictates that an internal check digit forms part of the code. This digit is the last digit before the check character. It would not normally form part of the human readable characters.

This table shows the full Code 128 character set:

 

VALUE CODE A CODE B CODE C VALUE CODE A CODE B CODE C
0 SP SP 00 50 R R 50
1 ! ! 01 51 S S 51
2 02 52 T T 52
3 # # 03 53 U U 53
4 $ $ 04 54 V V 54
5 % % 05 55 W W 55
6 & & 06 56 X X 56
7 07 57 Y Y 57
8 ( ( 08 58 Z Z 58
9 ) ) 09 59 [ [ 59
10 * * 10 60 \ \ 60
11 + + 11 61 ] ] 61
12 , , 12 62 62
13 13 63 _ _ 63
14 . . 14 64 NUL 64
15 / / 15 65 SOH a 65
16 0 0 16 66 STX b 66
17 1 1 17 67 ETX c 67
18 2 2 18 68 EOT d 68
19 3 3 19 69 ENQ e 69
20 4 4 20 70 ACK f 70
21 5 5 21 71 BEL g 71
22 6 6 22 72 BS h 72
23 7 7 23 73 HT i 73
24 8 8 24 74 LF j 74
25 9 9 25 75 VT k 75
26 : : 26 76 FF l 76
27 ; ; 27 77 CR m 77
28 < < 28 78 SO n 78
29 = = 29 79 SI o 79
30 > > 30 80 DL p 80
31 ? ? 31 81 DC1 q 81
32 @ @ 32 82 DC2 r 82
33 A A 33 83 DC3 s 83
34 B B 34 84 DC4 t 84
35 C C 35 85 NAK u 85
36 D D 36 86 SYN v 86
37 E E 37 87 ETB w 87
38 F F 38 88 CAN x 88
39 G G 39 89 EM y 89
40 H H 40 90 SUB z 90
41 I I 41 91 ESC { 91
42 J J 42 92 FS | 92
43 K K 43 93 GS } 93
44 L L 44 94 RS ~ 94
45 M M 45 95 US DEL 95
46 N N 46 96 FNC3 FNC3 96
47 O O 47 97 FNC2 FNC2 97
48 P P 48 98 SHIFT SHIFT 98
49 Q Q 49 99 Code C Code C 99
100 CODE B FNC 4 CODE B
101 FNC 4 CODE A CODE A
102 FNC1 FNC1 FNC1
103 START
CODE A
104 START
CODE B
105 START
CODE C

 

As mentioned previously, Code 128 is a relatively new code. So new that it is only just coming into widespread use. There are plans for its introduction in a number of areas with, no doubt, many more to follow.

Of the large-scale applications so far defined, most of them fall under the UCC/EAN umbrella. The UCC in the U.S. and the European Article Number Association have jointly agreed to use Code 128 for certain supplementary coding applications and have adopted the use of a FNC1 character immediately after the start character to indicate UCC/EAN use and a further two digit Application Qualifier (or Application Identifier) which further defines the intended use of the code.

Some of the Application Identifiers so far defined include:

Application Identifier

Type of Data

Alphanumeric/ Numeric

Max. Length

00 Serial Shipping Container Symbol N (fixed) 18
10 Batch Number AN 20
11 Production Date AN 20
12 Production Date AN 18
13 Packaging Date AN 20
14 Packaging Date AN 18
15 Best Before Date AN 20
16 Best Before Date AN 18
17 Sell By Date AN 20
18 Sell By Date AN 18
20 Product Variant N (fixed) 2
21 Serial Number AN 20

 

The use of the Application Identifier means that codes will not be confused. Furthermore, the use of the FNC1 character eliminates the risk of non-UCC/EAN Code 128 symbols being read by mistake.

Code 128