Code 128 is the barcode specification defined by ISO/IEC 15417:2007.
Code 128 barcodes can encode all 128 ASCII characters (including numbers, upper and lower case letters, symbols and control characters).
CODE128 code is a barcode code system widely used in enterprise internal management, production process, logistics control system. Because of its excellent characteristics, it is widely used in the design of management information system. CODE128 code is the most widely used barcode code. one of the system.
CODE128 code is a high-density barcode introduced in 1981. CODE128 code can represent a total of 128 characters from ASCII 0 to ASCII 127, so it is called 128 code. It contains numeric, alphabetic and symbolic characters.
CODE128 is one of the most popular, highest density linear barcodes and is widely used in applications where a relatively large amount of data must be encoded in a relatively small space. In most cases, it tends to replace Code 39 and Interleaved 2 of 5 as a more compact and flexible code for warehouse and distribution applications due to its continuous, self-checking bidirectional functionality. You’ll also find it commonly used in the health industry, blood banks, and electronics manufacturing.
Structure of Code128 barcodes
A Code 128 barcode consists of six parts.
- Blank space
- Start tag
- Data area
- Check character
- Terminator
- Blank space

Data area
Code 128 barcode specifies that 3 bars and 3 spaces (six cells in total) separated from each other represent a character, and each character starts with a bar and ends with a space. In barcode fonts, the last bar is usually combined with the terminator into a wider terminator.
The following table details the relationship between the width of each character barcode and the gap, the width of each bar can be 1, 2, 3, 4 units. For example, the letter “A” may be represented as pattern 10100011000, or as width 111323.
Code 128 Character Mappings
All characters supported by the barcode are as shown below. All of them have a simple direct mapping.
Code 128 Value (For Check Character) | Code 128 A | Code 128 B | Code 128 C | Barcode Font Character |
0 | ‘ ‘ | ‘ ‘ | 00 | ‘ ‘ (Space) |
1 | ‘!’ | ‘!’ | 01 | ‘!’ |
2 | ‘”‘ | ‘”‘ | 02 | ‘”‘ |
3 | ‘#’ | ‘#’ | 03 | ‘#’ |
4 | ‘$’ | ‘$’ | 04 | ‘$’ |
5 | ‘%’ | ‘%’ | 05 | ‘%’ |
6 | ‘&’ | ‘&’ | 06 | ‘&’ |
7 | ”’ | ”’ | 07 | ”’ |
8 | ‘(‘ | ‘(‘ | 08 | ‘(‘ |
9 | ‘)’ | ‘)’ | 09 | ‘)’ |
10 | ‘*’ | ‘*’ | 10 | ‘*’ |
11 | ‘+’ | ‘+’ | 11 | ‘+’ |
12 | ‘,’ | ‘,’ | 12 | ‘,’ |
13 | ‘-‘ | ‘-‘ | 13 | ‘-‘ |
14 | ‘.’ | ‘.’ | 14 | ‘.’ |
15 | ‘/’ | ‘/’ | 15 | ‘/’ |
16 | ‘0’ | ‘0’ | 16 | ‘0’ |
17 | ‘1’ | ‘1’ | 17 | ‘1’ |
18 | ‘2’ | ‘2’ | 18 | ‘2’ |
19 | ‘3’ | ‘3’ | 19 | ‘3’ |
20 | ‘4’ | ‘4’ | 20 | ‘4’ |
21 | ‘5’ | ‘5’ | 21 | ‘5’ |
22 | ‘6’ | ‘6’ | 22 | ‘6’ |
23 | ‘7’ | ‘7’ | 23 | ‘7’ |
24 | ‘8’ | ‘8’ | 24 | ‘8’ |
25 | ‘9’ | ‘9’ | 25 | ‘9’ |
26 | ‘:’ | ‘:’ | 26 | ‘:’ |
27 | ‘;’ | ‘;’ | 27 | ‘;’ |
28 | ‘<‘ | ‘<‘ | 28 | ‘<‘ |
29 | ‘=’ | ‘=’ | 29 | ‘=’ |
30 | ‘>’ | ‘>’ | 30 | ‘>’ |
31 | ‘?’ | ‘?’ | 31 | ‘?’ |
32 | ‘@’ | ‘@’ | 32 | ‘@’ |
33 | ‘A’ | ‘A’ | 33 | ‘A’ |
34 | ‘B’ | ‘B’ | 34 | ‘B’ |
35 | ‘C’ | ‘C’ | 35 | ‘C’ |
36 | ‘D’ | ‘D’ | 36 | ‘D’ |
37 | ‘E’ | ‘E’ | 37 | ‘E’ |
38 | ‘F’ | ‘F’ | 38 | ‘F’ |
39 | ‘G’ | ‘G’ | 39 | ‘G’ |
40 | ‘H’ | ‘H’ | 40 | ‘H’ |
41 | ‘I’ | ‘I’ | 41 | ‘I’ |
42 | ‘J’ | ‘J’ | 42 | ‘J’ |
43 | ‘K’ | ‘K’ | 43 | ‘K’ |
44 | ‘L’ | ‘L’ | 44 | ‘L’ |
45 | ‘M’ | ‘M’ | 45 | ‘M’ |
46 | ‘N’ | ‘N’ | 46 | ‘N’ |
47 | ‘O’ | ‘O’ | 47 | ‘O’ |
48 | ‘P’ | ‘P’ | 48 | ‘P’ |
49 | ‘Q’ | ‘Q’ | 49 | ‘Q’ |
50 | ‘R’ | ‘R’ | 50 | ‘R’ |
51 | ‘S’ | ‘S’ | 51 | ‘S’ |
52 | ‘T’ | ‘T’ | 52 | ‘T’ |
53 | ‘U’ | ‘U’ | 53 | ‘U’ |
54 | ‘V’ | ‘V’ | 54 | ‘V’ |
55 | ‘W’ | ‘W’ | 55 | ‘W’ |
56 | ‘X’ | ‘X’ | 56 | ‘X’ |
57 | ‘Y’ | ‘Y’ | 57 | ‘Y’ |
58 | ‘Z’ | ‘Z’ | 58 | ‘Z’ |
59 | ‘[‘ | ‘[‘ | 59 | ‘[‘ |
60 | ‘\’ | ‘\’ | 60 | ‘\’ |
61 | ‘]’ | ‘]’ | 61 | ‘]’ |
62 | ‘^’ | ‘^’ | 62 | ‘^’ |
63 | ‘_’ | ‘_’ | 63 | ‘_’ |
64 | NUL | ‘`’ | 64 | ‘`’ |
65 | SOH | ‘a’ | 65 | ‘a’ |
66 | STX | ‘b’ | 66 | ‘b’ |
67 | ETX | ‘c’ | 67 | ‘c’ |
68 | EOT | ‘d’ | 68 | ‘d’ |
69 | ENQ | ‘e’ | 69 | ‘e’ |
70 | ACK | ‘f’ | 70 | ‘f’ |
71 | BEL | ‘g’ | 71 | ‘g’ |
72 | BS | ‘h’ | 72 | ‘h’ |
73 | HT | ‘i’ | 73 | ‘i’ |
74 | LF | ‘j’ | 74 | ‘j’ |
75 | VT | ‘k’ | 75 | ‘k’ |
76 | FF | ‘l’ | 76 | ‘l’ |
77 | CR | ‘m’ | 77 | ‘m’ |
78 | SO | ‘n’ | 78 | ‘n’ |
79 | SI | ‘o’ | 79 | ‘o’ |
80 | DLE | ‘p’ | 80 | ‘p’ |
81 | DC1 | ‘q’ | 81 | ‘q’ |
82 | DC2 | ‘r’ | 82 | ‘r’ |
83 | DC3 | ‘s’ | 83 | ‘s’ |
84 | DC4 | ‘t’ | 84 | ‘t’ |
85 | NAK | ‘u’ | 85 | ‘u’ |
86 | SYN | ‘v’ | 86 | ‘v’ |
87 | ETB | ‘w’ | 87 | ‘w’ |
88 | CAN | ‘x’ | 88 | ‘x’ |
89 | EM | ‘y’ | 89 | ‘y’ |
90 | SUB | ‘z’ | 90 | ‘z’ |
91 | ESC | ‘{‘ | 91 | ‘{‘ |
92 | FS | ‘|’ | 92 | ‘|’ |
93 | GS | ‘}’ | 93 | ‘}’ |
94 | RS | ‘~’ | 94 | ‘~’ |
95 | US | DEL | 95 | 227 (ASCII value) |
96 | FNC3 | FNC3 | 96 | 228 (ASCII value) |
97 | FNC2 | FNC2 | 97 | 229 (ASCII value) |
98 | Shift | Shift | 98 | 230 (ASCII value) |
99 | Code C | Code C | 99 | 231 (ASCII value) |
100 | Code B | FNC4 | Code B | 232 (ASCII value) |
101 | FNC4 | Code A | Code A | 233 (ASCII value) |
102 | FNC1 | FNC1 | FNC1 | 234 (ASCII value) |
103 | Start A | Start A | Start A | 235 (ASCII value) |
104 | Start B | Start B | Start B | 236 (ASCII value) |
105 | Start C | Start C | Start C | 237 (ASCII value) |
106 | Stop | Stop | Stop | 238 (ASCII value) |