Code 128 is a very high-density barcode symbology, used extensively world wide in shipping and packaging industries. It is used for alphanumeric or numeric-only barcodes. It can encode all 128 characters of ASCII and, by use of an extension character (FNC4), the Latin-1 characters defined in ISO/IEC 8859-1. Code 128 is one of the most popular modern barcodes. It is a very high density barcode supporting alphanumeric characters. This barcode is used as the basis for many other barcodes like UCC/EAN, HIBC(Health Industry Barcode) and the Blood Bank Industry barcode.
Code128 Barcode
Code128 barcode is currently one of the most widely used barcode. The reason is that this barcode can support the full ASCII character set, is flexible and can support very dense (number of characters per inch) barcode. Under the industry specifications, this barcode supports three different variations : Code 128 A, Code 128 B and Code 128 C. Each of the variations is targeted for specific purposes and switching between the different variations is possible with additional control characters. With the switching, the specifications also cater to an Auto mode to help users create the barcode easily. The Auto mode allows the barcode software to auto detect the data, determine the most optimized variation and, if required, switch between the variations automatically. It is recommended to use the Barcode Generator, the Excel Add in or other tools provided by Aeromium for the Auto mode.
Generating this barcode using the Barcode Generator
The easiest way to create this barcode is to use the Barcode Generator included in the installation package. Simply goto the Start Menu and launch Aeromium Barcode Fonts > Barcode Generator. This software automatesand simplifies the creation of the barcodes for you. After the barcode is created, you can simply copyand paste the barcode into your documents.
Generating this barcode using the Barcode Generator
Generating this barcode in Excel
Code 128 Barcode Fonts
The following is the list of fonts with varying heights supported by Aeromium. All the different variations of this barcode use the same set of fonts below.
FontCode128H1.ttf
FontCode128H2.ttf
FontCode128H3.ttf (Default Font)
FontCode128H4.ttf
FontCode128H5.ttf
FontCode128H6.ttf
Using this Barcode Manually
Code 128 AThe following table lists the characters supported by the Code 128 A barcode. The first column represents your data characters to be encoded by the barcode. The second column represents the barcode font characters to use. The Barcode Generator and Excel Macros will automatically help translate the data to the barcode font character and compute the check character. The characters for mode (variation) switching are also included in the table below. It is recommended to use the Barcode Generator, the Excel Add in or other tools provided by Aeromium for the Auto mode. This is to prevent human errors when creating the barcodes.
Data to be Encoded | Font Character to use | Values used for calculating Check Character |
' ' | ' ' (Space) | 0 |
'!' | '!' | 1 |
'' | '' | 2 |
'#' | '#' | 3 |
'$' | '$' | 4 |
'%' | '%' | 5 |
'&' | '&' | 6 |
'' | '' | 7 |
'(' | '(' | 8 |
')' | ')' | 9 |
'*' | '*' | 10 |
'+' | '+' | 11 |
',' | ',' | 12 |
'-' | '-' | 13 |
'.' | '.' | 14 |
'/' | '/' | 15 |
'0' | '0' | 16 |
'1' | '1' | 17 |
'2' | '2' | 18 |
'3' | '3' | 19 |
'4' | '4' | 20 |
'5' | '5' | 21 |
'6' | '6' | 22 |
'7' | '7' | 23 |
'8' | '8' | 24 |
'9' | '9' | 25 |
':' | ':' | 26 |
';' | ';' | 27 |
'<' | '<' | 28 |
'=' | '=' | 29 |
'>' | '>' | 30 |
'?' | '?' | 31 |
'@' | '@' | 32 |
'A' | 'A' | 33 |
'B' | 'B' | 34 |
'C' | 'C' | 35 |
'D' | 'D' | 36 |
'E' | 'E' | 37 |
'F' | 'F' | 38 |
'G' | 'G' | 39 |
'H' | 'H' | 40 |
'I' | 'I' | 41 |
'J' | 'J' | 42 |
'K' | 'K' | 43 |
'L' | 'L' | 44 |
'M' | 'M' | 45 |
'N' | 'N' | 46 |
'O' | 'O' | 47 |
'P' | 'P' | 48 |
'Q' | 'Q' | 49 |
'R' | 'R' | 50 |
'S' | 'S' | 51 |
'T' | 'T' | 52 |
'U' | 'U' | 53 |
'V' | 'V' | 54 |
'W' | 'W' | 55 |
'X' | 'X' | 56 |
'Y' | 'Y' | 57 |
'Z' | 'Z' | 58 |
'[' | '[' | 59 |
' | ' | 60 |
']' | ']' | 61 |
'^' | '^' | 62 |
'_' | '_' | 63 |
NUL | '`' | 64 |
SOH | 'a' | 65 |
STX | 'b' | 66 |
ETX | 'c' | 67 |
EOT | 'd' | 68 |
ENQ | 'e' | 69 |
ACK | 'f' | 70 |
BEL | 'g' | 71 |
BS | 'h' | 72 |
HT | 'i' | 73 |
LF | 'j' | 74 |
VT | 'k' | 75 |
FF | 'l' | 76 |
CR | 'm' | 77 |
SO | 'n' | 78 |
SI | 'o' | 79 |
DLE | 'p' | 80 |
DC1 | 'q' | 81 |
DC2 | 'r' | 82 |
DC3 | 's' | 83 |
DC4 | 't' | 84 |
NAK | 'u' | 85 |
SYN | 'v' | 86 |
ETB | 'w' | 87 |
CAN | 'x' | 88 |
EM | 'y' | 89 |
SUB | 'z' | 90 |
ESC | '{' | 91 |
FS | '|' | 92 |
GS | '}' | 93 |
RS | '~' | 94 |
US | ASCII 176 | 95 |
FNC3 | ASCII 177 | 96 |
FNC2 | ASCII 178 | 97 |
Shift | ASCII 179 | 98 |
Code C | ASCII 180 | 99 |
Code B | ASCII 181 | 100 |
FNC4 | ASCII 182 | 101 |
FNC1 | ASCII 183 | 102 |
Start A | ASCII 184 | 103 |
Start B | ASCII 185 | 104 |
Start C | ASCII 186 | 105 |
Stop | ASCII 187 | 106 |
Code 128 B
The following table lists the characters supported by the Code 128 B barcode. The first column represents your data characters to be encoded by the barcode. The second column represents the barcode font characters to use.
Data to be Encoded | Font Character to use | Values used for calculating Check Character |
' ' | ' ' (Space) | 0 |
'!' | '!' | 1 |
'' | '' | 2 |
'#' | '#' | 3 |
'$' | '$' | 4 |
'%' | '%' | 5 |
'&' | '&' | 6 |
'' | '' | 7 |
'(' | '(' | 8 |
')' | ')' | 9 |
'*' | '*' | 10 |
'+' | '+' | 11 |
',' | ',' | 12 |
'-' | '-' | 13 |
'.' | '.' | 14 |
'/' | '/' | 15 |
'0' | '0' | 16 |
'1' | '1' | 17 |
'2' | '2' | 18 |
'3' | '3' | 19 |
'4' | '4' | 20 |
'5' | '5' | 21 |
'6' | '6' | 22 |
'7' | '7' | 23 |
'8' | '8' | 24 |
'9' | '9' | 25 |
':' | ':' | 26 |
';' | ';' | 27 |
'<' | '<' | 28 |
'=' | '=' | 29 |
'>' | '>' | 30 |
'?' | '?' | 31 |
'@' | '@' | 32 |
'A' | 'A' | 33 |
'B' | 'B' | 34 |
'C' | 'C' | 35 |
'D' | 'D' | 36 |
'E' | 'E' | 37 |
'F' | 'F' | 38 |
'G' | 'G' | 39 |
'H' | 'H' | 40 |
'I' | 'I' | 41 |
'J' | 'J' | 42 |
'K' | 'K' | 43 |
'L' | 'L' | 44 |
'M' | 'M' | 45 |
'N' | 'N' | 46 |
'O' | 'O' | 47 |
'P' | 'P' | 48 |
'Q' | 'Q' | 49 |
'R' | 'R' | 50 |
'S' | 'S' | 51 |
'T' | 'T' | 52 |
'U' | 'U' | 53 |
'V' | 'V' | 54 |
'W' | 'W' | 55 |
'X' | 'X' | 56 |
'Y' | 'Y' | 57 |
'Z' | 'Z' | 58 |
'[' | '[' | 59 |
' | ' | 60 |
']' | ']' | 61 |
'^' | '^' | 62 |
'_' | '_' | 63 |
'`' | '`' | 64 |
'a' | 'a' | 65 |
'b' | 'b' | 66 |
'c' | 'c' | 67 |
'd' | 'd' | 68 |
'e' | 'e' | 69 |
'f' | 'f' | 70 |
'g' | 'g' | 71 |
'h' | 'h' | 72 |
'i' | 'i' | 73 |
'j' | 'j' | 74 |
'k' | 'k' | 75 |
'l' | 'l' | 76 |
'm' | 'm' | 77 |
'n' | 'n' | 78 |
'o' | 'o' | 79 |
'p' | 'p' | 80 |
'q' | 'q' | 81 |
'r' | 'r' | 82 |
's' | 's' | 83 |
't' | 't' | 84 |
'u' | 'u' | 85 |
'v' | 'v' | 86 |
'w' | 'w' | 87 |
'x' | 'x' | 88 |
'y' | 'y' | 89 |
'z' | 'z' | 90 |
'{' | '{' | 91 |
'|' | '|' | 92 |
'}' | '}' | 93 |
'~' | '~' | 94 |
DEL | ASCII 176 | 95 |
FNC3 | ASCII 177 | 96 |
FNC2 | ASCII 178 | 97 |
Shift | ASCII 179 | 98 |
Code C | ASCII 180 | 99 |
FNC4 | ASCII 181 | 100 |
Code A | ASCII 182 | 101 |
FNC1 | ASCII 183 | 102 |
Start A | ASCII 184 | 103 |
Start B | ASCII 185 | 104 |
Start C | ASCII 186 | 105 |
Stop | ASCII 187 | 106 |
Code 128 C
The following table lists the characters supported by the Code 128 C barcode. The first column represents your data characters to be encoded by the barcode. The second column represents the barcode font characters to use.
Data to be Encoded | Font Character to use | Values used for calculating Check Character |
00 | ' ' (Space) | 0 |
01 | '!' | 1 |
02 | '' | 2 |
03 | '#' | 3 |
04 | '$' | 4 |
05 | '%' | 5 |
06 | '&' | 6 |
07 | '' | 7 |
08 | '(' | 8 |
09 | ')' | 9 |
10 | '*' | 10 |
11 | '+' | 11 |
12 | ',' | 12 |
13 | '-' | 13 |
14 | '.' | 14 |
15 | '/' | 15 |
16 | '0' | 16 |
17 | '1' | 17 |
18 | '2' | 18 |
19 | '3' | 19 |
20 | '4' | 20 |
21 | '5' | 21 |
22 | '6' | 22 |
23 | '7' | 23 |
24 | '8' | 24 |
25 | '9' | 25 |
26 | ':' | 26 |
27 | ';' | 27 |
28 | '<' | 28 |
29 | '=' | 29 |
30 | '>' | 30 |
31 | '?' | 31 |
32 | '@' | 32 |
33 | 'A' | 33 |
34 | 'B' | 34 |
35 | 'C' | 35 |
36 | 'D' | 36 |
37 | 'E' | 37 |
38 | 'F' | 38 |
39 | 'G' | 39 |
40 | 'H' | 40 |
41 | 'I' | 41 |
42 | 'J' | 42 |
43 | 'K' | 43 |
44 | 'L' | 44 |
45 | 'M' | 45 |
46 | 'N' | 46 |
47 | 'O' | 47 |
48 | 'P' | 48 |
49 | 'Q' | 49 |
50 | 'R' | 50 |
51 | 'S' | 51 |
52 | 'T' | 52 |
53 | 'U' | 53 |
54 | 'V' | 54 |
55 | 'W' | 55 |
56 | 'X' | 56 |
57 | 'Y' | 57 |
58 | 'Z' | 58 |
59 | '[' | 59 |
60 | ' | 60 |
61 | ']' | 61 |
62 | '^' | 62 |
63 | '_' | 63 |
64 | '`' | 64 |
65 | 'a' | 65 |
66 | 'b' | 66 |
67 | 'c' | 67 |
68 | 'd' | 68 |
69 | 'e' | 69 |
70 | 'f' | 70 |
71 | 'g' | 71 |
72 | 'h' | 72 |
73 | 'i' | 73 |
74 | 'j' | 74 |
75 | 'k' | 75 |
76 | 'l' | 76 |
77 | 'm' | 77 |
78 | 'n' | 78 |
79 | 'o' | 79 |
80 | 'p' | 80 |
81 | 'q' | 81 |
82 | 'r' | 82 |
83 | 's' | 83 |
84 | 't' | 84 |
85 | 'u' | 85 |
86 | 'v' | 86 |
87 | 'w' | 87 |
88 | 'x' | 88 |
89 | 'y' | 89 |
90 | 'z' | 90 |
91 | '{' | 91 |
92 | '|' | 92 |
93 | '}' | 93 |
94 | '~' | 94 |
95 | ASCII 176 | 95 |
96 | ASCII 177 | 96 |
97 | ASCII 178 | 97 |
98 | ASCII 179 | 98 |
99 | ASCII 180 | 99 |
Code B | ASCII 181 | 100 |
Code A | ASCII 182 | 101 |
FNC1 | ASCII 183 | 102 |
Start A | ASCII 184 | 103 |
Start B | ASCII 185 | 104 |
Start C | ASCII 186 | 105 |
Stop | ASCII 187 | 106 |
Examples
Code 128A
To encode the data 'TESTIT' without the check digit manually, simply key in '[ASCII 184]TESTITm[ASCII 187]' and select the FontCode128H3.ttf font. The output is as follows :
The 'm' is the check character and its computation is illustrated in the next section below. [ASCII 184] is the start character of Code 128 A while [ASCII 187] is the stop character of Code 128 A.
Code 128B
To encode the data 'testit' without the check digit manually, simply key in '[ASCII 185]testit=[ASCII 187]' and select the FontCode128H3.ttf font. The output is as follows :
The '=' is the check character and it's computation is illustrated in the next section below. [ASCII 185] is the start character of Code 128 B while [ASCII 187] is the stop character of Code 128 B.
Code 128C
To encode the data '12345678' without the check digit manually, simply key in '[ASCII 186],BXnO[ASCII 186]' and select the FontCode128H3.ttf font. The output is as follows :
The 'm' is the check character and its computation is illustrated in the next section below. [ASCII 184] is the start character of Code 128 A while [ASCII 187] is the stop character of Code 128 A.
Code 128B
To encode the data 'testit' without the check digit manually, simply key in '[ASCII 185]testit=[ASCII 187]' and select the FontCode128H3.ttf font. The output is as follows :
The '=' is the check character and it's computation is illustrated in the next section below. [ASCII 185] is the start character of Code 128 B while [ASCII 187] is the stop character of Code 128 B.
Code 128C
To encode the data '12345678' without the check digit manually, simply key in '[ASCII 186],BXnO[ASCII 186]' and select the FontCode128H3.ttf font. The output is as follows :
',' represents '12'
'B' represents '34'
'X' represents '56'
'n' represents '78'
The 'O' is the check character and it's computation is illustrated in the next section below. [ASCII 186] is the start character of Code 128 C while [ASCII 187] is the stop character of Code 128 C.
How to compute the check digit
Code 128AData - TESTIT
Data to be Encoded | T | E | S | T | I | T |
Multiply each of the character (the Code 128 value) with an increasing weight. | ||||||
Check Character Values | 52 | 37 | 51 | 52 | 41 | 52 |
Weight | *1 | *2 | *3 | *4 | *5 | *6 |
Sum : | (52*1) + (37*2) + (51*3) + (52*4) + (41*5) + (52*6) = 1004 | |||||
For Code 128A barcode, add 103 to the sum above | ||||||
Total | 1004 + 103 = 1107 | |||||
Check Character (Modulo 103) : | 1107 % 103 = 77 (which is represented by the character 'm') |
Code 128B
Barcode 128 Tab
Data - testitBarcode 128 Excel Font
Data to be Encoded | T | E | S | T | I | T |
Multiply each of the character (the Code 128 value) with an increasing weight. | ||||||
Check Character Values | 84 | 69 | 83 | 84 | 73 | 84 |
Weight | *1 | *2 | *3 | *4 | *5 | *6 |
Sum : | (84*1) + (69*2) + (83*3) + (84*4) + (73*5) + (84*6) = 1676 | |||||
For Code 128B barcode, add 104 to the sum above | ||||||
Total | 1676 + 104 = 1780 | |||||
Check Character (Modulo 103) : | 1780 % 103 = 29 (which is represented by the character '=') |
Code 128C
Data - 12345678
Data to be Encoded | 12 | 34 | 56 | 78 |
Multiply each of the character (the Code 128 value) with an increasing weight. | ||||
Check Character Values | 12 | 34 | 56 | 78 |
Weight | *1 | *2 | *3 | *4 |
Sum : | (12*1) + (34*2) + (56*3) + (78*4) = 560 | |||
For Code 128C barcode, add 105 to the sum above | ||||
Total | 560 + 105 = 665 | |||
Check Character (Modulo 103) : | 665 % 103 = 47 (which is represented by the character 'O') |
Back to Barcode Fonts.
Code 128 Barcode Font Overview
Code 128 Barcode Fonts encode numbers, symbols, uppercase and lowercase text as well as functions such as returns and tabs. All Code 128 barcode fonts require a start character, checksum character, and a stop character to create readable barcodes. Due to the required calculation of a checksum, implementation of Code 128 as a barcode font may be difficult without IDAutomation's Font Encoder Tools.
Code 128 Barcode Font Character Set
Three different start characters are used in Code 128 barcodes to tell the barcode reader, which character set is being used. The table below illustrates the three character sets in columns with the location of the characters. In the columns A, B and C, is the list of characters or functions that the barcode scanner will read for the associated symbol. The columns ASCII, Char and Unicode are unique to IDAutomation's Code 128 Barcode Fonts. These columns designate the location in either ASCII or Unicode where the barcode symbol for the character resides in the font. The Char column lists the character that resides at the ASCII location, which can be used to print the corresponding symbol. The character set provides easy methods of encoding functions in barcodes such as returns and tabs.
Code A | Code B | Code C | ASCII* | Unicode* | Char* | Value | Code A | Code B | Code C | ASCII* | Unicode* | Char* | Value |
Space | Space | 00 | 0194 | 00C2 | Â | 00 | V | V | 54 | 0086 | 0056 | V | 54 |
! | ! | 01 | 0033 | 0021 | ! | 01 | W | W | 55 | 0087 | 0057 | W | 55 |
' | ' | 02 | 0034 | 0022 | ' | 02 | X | X | 56 | 0088 | 0058 | X | 56 |
# | # | 03 | 0035 | 0023 | # | 03 | Y | Y | 57 | 0089 | 0059 | Y | 57 |
$ | $ | 04 | 0036 | 0024 | $ | 04 | Z | Z | 58 | 0090 | 005A | Z | 58 |
% | % | 05 | 0037 | 0025 | % | 05 | [ | [ | 59 | 0091 | 005B | [ | 59 |
& | & | 06 | 0038 | 0026 | & | 06 | 60 | 0092 | 005C | 60 | |||
' | ' | 07 | 0039 | 0027 | ' | 07 | ] | ] | 61 | 0093 | 005D | ] | 61 |
( | ( | 08 | 0040 | 0028 | ( | 08 | ^ | ^ | 62 | 0094 | 005E | ^ | 62 |
) | ) | 09 | 0041 | 0029 | ) | 09 | _ | _ | 63 | 0095 | 005F | _ | 63 |
* | * | 10 | 0042 | 002A | * | 10 | nul | ` | 64 | 0096 | 0060 | ` | 64 |
+ | + | 11 | 0043 | 002B | + | 11 | soh | a | 65 | 0097 | 0061 | a | 65 |
, | , | 12 | 0044 | 002C | , | 12 | stx | b | 66 | 0098 | 0062 | b | 66 |
- | - | 13 | 0045 | 002D | - | 13 | etx | c | 67 | 0099 | 0063 | c | 67 |
. | . | 14 | 0046 | 002E | . | 14 | eot | d | 68 | 0100 | 0064 | d | 68 |
/ | / | 15 | 0047 | 002F | / | 15 | eno | e | 69 | 0101 | 0065 | e | 69 |
0 | 0 | 16 | 0048 | 0030 | 0 | 16 | ack | f | 70 | 0102 | 0066 | f | 70 |
1 | 1 | 17 | 0049 | 0031 | 1 | 17 | bel | g | 71 | 0103 | 0067 | g | 71 |
2 | 2 | 18 | 0050 | 0032 | 2 | 18 | bs | h | 72 | 0104 | 0068 | h | 72 |
3 | 3 | 19 | 0051 | 0033 | 3 | 19 | ht | i | 73 | 0105 | 0069 | i | 73 |
4 | 4 | 20 | 0052 | 0034 | 4 | 20 | lf | j | 74 | 0106 | 006A | j | 74 |
5 | 5 | 21 | 0053 | 0035 | 5 | 21 | vt | k | 75 | 0107 | 006B | k | 75 |
6 | 6 | 22 | 0054 | 0036 | 6 | 22 | ff | l | 76 | 0108 | 006C | l | 76 |
7 | 7 | 23 | 0055 | 0037 | 7 | 23 | cr | m | 77 | 0109 | 006D | m | 77 |
8 | 8 | 24 | 0056 | 0038 | 8 | 24 | s0 | n | 78 | 0110 | 006E | n | 78 |
9 | 9 | 25 | 0057 | 0039 | 9 | 25 | s1 | o | 79 | 0111 | 006F | o | 79 |
: | : | 26 | 0058 | 003A | : | 26 | dle | p | 80 | 0112 | 0070 | p | 80 |
; | ; | 27 | 0059 | 003B | ; | 27 | dc1 | q | 81 | 0113 | 0071 | q | 81 |
< | < | 28 | 0060 | 003C | < | 28 | dc2 | r | 82 | 0114 | 0072 | r | 82 |
= | = | 29 | 0061 | 003D | = | 29 | dc3 | s | 83 | 0115 | 0073 | s | 83 |
> | > | 30 | 0062 | 003E | > | 30 | dc4 | t | 84 | 0116 | 0074 | t | 84 |
? | ? | 31 | 0063 | 003F | ? | 31 | nak | u | 85 | 0117 | 0075 | u | 85 |
@ | @ | 32 | 0064 | 0040 | @ | 32 | syn | v | 86 | 0118 | 0076 | v | 86 |
A | A | 33 | 0065 | 0041 | A | 33 | etb | w | 87 | 0119 | 0077 | w | 87 |
B | B | 34 | 0066 | 0042 | B | 34 | can | x | 88 | 0120 | 0078 | x | 88 |
C | C | 35 | 0067 | 0043 | C | 35 | em | y | 89 | 0121 | 0079 | y | 89 |
D | D | 36 | 0068 | 0044 | D | 36 | sub | z | 90 | 0122 | 007A | z | 90 |
E | E | 37 | 0069 | 0045 | E | 37 | esc | { | 91 | 0123 | 007B | { | 91 |
F | F | 38 | 0070 | 0046 | F | 38 | fs | | | 92 | 0124 | 007C | | | 92 |
G | G | 39 | 0071 | 0047 | G | 39 | gs | } | 93 | 0125 | 007D | } | 93 |
H | H | 40 | 0072 | 0048 | H | 40 | rs | ~ | 94 | 0126 | 007E | ~ | 94 |
I | I | 41 | 0073 | 0049 | I | 41 | us | del | 95 | 0195 | 00C3 | Ã | 95 |
J | J | 42 | 0074 | 004A | J | 42 | fnc 3 | fnc 3 | 96 | 0196 | 00C4 | Ä | 96 |
K | K | 43 | 0075 | 004B | K | 43 | fnc 2 | fnc2 | 97 | 0197 | 00C5 | Å | 97 |
L | L | 44 | 0076 | 004C | L | 44 | Shift | Shift | 98 | 0198 | 00C6 | Æ | 98 |
M | M | 45 | 0077 | 004D | M | 45 | code C | code C | 99 | 0199 | 00C7 | Ç | 99 |
N | N | 46 | 0078 | 004E | N | 46 | code B | fnc 4 | code B | 0200 | 00C8 | È | 100 |
O | O | 47 | 0079 | 004F | O | 47 | fnc 4 | code A | code A | 0201 | 00C9 | É | 101 |
P | P | 48 | 0080 | 0050 | P | 48 | fnc 1 | fnc 1 | fnc 1 | 0202 | 00CA | Ê | 102 |
Q | Q | 49 | 0081 | 0051 | Q | 49 | Start A | Start A | Start A | 0203 | 00CB | Ë | 103 |
R | R | 50 | 0082 | 0052 | R | 50 | Start B | Start B | Start B | 0204 | 00CC | Ì | 104 |
S | S | 51 | 0083 | 0053 | S | 51 | Start C | Start C | Start C | 0205 | 00CD | Í | 105 |
T | T | 52 | 0084 | 0054 | T | 52 | Stop | Stop | Stop | 0206 | 00CE | Î | |
U | U | 53 | 0085 | 0055 | U | 53 |
* It is necessary to print the Code 128 barcode space character from ASCII 194 instead of ASCII 32 because Windows cannot print a symbol instead of a space character from Visual Basic and most other development environments. Mac systems should print the Code128 barcode font from Unicode locations if possible because the extended characters map to different character than what is displayed on the 'Char' column in Mac Roman encoding.
* If the system regional setting is not set to 'English' or the 1252 Latin-1 code page, the Code 128 fonts support the following additional code pages in Windows: 1250 European, 1251 Cyrillic, 1253 Greek, 1254 Turkish, 1255 Hebrew and 1256 Arabic. If compatibility is necessary with any operating system, code page and locale, IDAutomation offers the Universal Barcode Font Package which creates Code 128 and many other barcode types from a single font.
* The columns ASCII, Char and Unicode are unique to IDAutomation's Code 128 Barcode Fonts.
Manual Check Character Calculation
IDAutomation provides font encoders and source code samples that are free to use with IDAutomation fonts, which will automatically format the start, stop and check characters to the barcode fonts. Therefore, manual check digit calculations are usually not necessary.
The check character is positioned after the data characters and just before the stop character. To determine the value of the check character:
- Reference the table above to obtain the value of the start character and all data characters.
- Assign a weighting to each data character (not the start character, just the data characters.) The weighting starts at 1 and increases by one for each data character.
- Multiply the character values by their weights for the data characters.
- Add these all together, including the start character, divide by 103 and obtain the remainder.
- Use the table above to locate the character that has the value of the remainder; use this as the check character.
Calculating Code 128 Character Set A or B
The following table is an example of how to obtain the check character for the data 'biz' using Code 128 character set B.
Start B | b | i | z | STOP |
weighting | 1 | 2 | 3 | |
values | 104 | 66 | 73 | 90 |
totals | 104 | 66 | 146 | 270 |
- Calculate Total: 104 + (66*1) + (73*2) + (90*3) = 586
- Calculate Checksum: 586 divided by 103 = 5 remainder of 71. Check digit = value of 71. The character to print for the value of 71 is 'g' or ASCII 103.
Barcode 128 Ttf
To print extended ASCII characters from a keyboard that does not have the keys defined, use the ALT+ key combination where xxxx equals the character's ASCII location in 4 digits. For example, to type ASCII character 104 into Microsoft Word, select the font in Word, press the ALT key and while holding it down type 0104 on the keypad of the keyboard. Four digits must be entered with the keypad only.
Therefore, to print the data 'biz' as a barcode, type: ALT 0204, b, i, z, g, ALT 0206 or ÌbizgÎ.
Calculating Code 128 Character Set C
The following table is an example of how to obtain the check character for '667390' using Code 128 character set C:
First, interleave the numbers into pairs and then choose the appropriate character that represents the number pair from the Code 128 Character Set.
Start C | 66 | 73 | 90 | STOP |
weighting | 1 | 2 | 3 | |
values | 105 | 66 | 73 | 90 |
totals | 105 | 66 | 146 | 270 |
- Calculate the Total:
105 + (66*1) + (73*2) + (90*3) = 587 - Calculate the Checksum:
587 divided by 103 = 5 remainder of 72. Check digit = value of 72.
The character to print for the value of 72 is ASCII 104.
Therefore, to print the data '667390' as a barcode, you would need to type: ALT 0205, b, i, z, h, ALT 0206 or ÍbizhÎ.
Switching Between Code 128 Character Sets
It is possible to switch between character sets in a single Code 128 barcode. Although character set B can encode text and numbers, it may be necessary to switch to set A to encode a function such as a tab or carriage return.
The following table is an example of how to encode the data 'biz' using Code 128 character set B with a switch to character set A for a carriage return function:
Start B | b | i | z | É | m | STOP |
weighting | 1 | 2 | 3 | 4 | 5 | |
values | 104 | 66 | 73 | 90 | 101 | 77 |
totals | 104 | 66 | 146 | 270 | 404 | 385 |
- Calculate Total: 104 + (66*1) + (73*2) + (90*3) + (101*4) + (77*5) = 1375
- Calculate Checksum: 1375 divided by 103 = 13 remainder of 36. Check digit = value of 36. The character to print for the value of 36 is 'D' or ASCII 68.
This type of switching between character sets is also compatible with the free font encoder tools. For example, specify the data bizÉm (É is the switch to set A and m is the function according to the chart) as the input for the Code 128 B function, the data ÌbizÉmDÎ would be returned, which would perform the switch to set A and the function of a return when printed with IDAutomation's font and scanned by a barcode scanner.
Calculating Check Digits For GS1-128
The FNC1 in the GS1-128 barcode is treated as any other character. This example demonstrates how to calculate (00)1234(15)12 which would be encoded as Ê001234Ê1512 in IDAutomation's font encoders. More information about creating GS1-128, UCC-128 and EAN-128 barcodes is provided in the GS1-128 Barcode FAQ and Tutorial.
Barcode 128 Excel
Start C | FNC1 | 00 | 12 | 34 | FNC1 | 15 | 12 | STOP |
weighting | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |
values | 105 | 102 | 00 | 12 | 34 | 102 | 15 | 12 |
totals | 105 | 102 | 00 | 36 | 136 | 510 | 90 | 84 |
- Add up totals: = 1063
- Calculate Checksum: 1063 divided by 103 = 10 remainder of 33. Check digit = value of 33.
Therefore, the following text is needed to create the barcode from the font: ÍÊÂ,BÊ/,AÎ
Code 128 Barcode Font Specifications
The X dimension (X is the width of the narrow bar) is listed below for various point sizes in millimeters and mils. 1 mil is equal to 1/1000 of an inch. IDAutomation's Code 128 barcode fonts have been specially designed to be able to produce dependable barcodes when printed at large and small point sizes. The Code 128 font may be printed as small as 4 points if the scanner is capable reading it. The Code 128 fonts are reliably read with the IDAutomation USB Barcode Scanner at point sizes of 6 to 48 points.
Point Size | Approximate X dimension (1 mil = .001') | |
48 | .102 cm | 40 mil |
36 | .076 cm | 30 mil |
32 | .069 cm | 27 mil |
30 | .064 cm | 25 mil |
28 | .058 cm | 23 mil |
24 | .051 cm | 20 mil |
20 | .043 cm | 17 mil |
18 | .038 cm | 15 mil |
16 | .033 cm | 13 mil |
12 | .025 cm | 10 mil |
8 | .018 cm | 7 mil |
6 | .013 cm | 5 mil |
* To print at a different X dimension, find the point size that has the X dimension closest to what is needed and use the formula below to find the point size needed: |
When using a printer with less than 600 DPI, print at the following point sizes to create accurate barcodes:
203 DPI Printer (thermal printer) | 300 DPI Printer |
6, 12, 18, 24, 30, 36 | 4, 8, 12, 16, 20, 24, 28, 32, 36 |
Eighteen different versions of the Code 128 barcode fonts are provided to support human readable versions and different width and height requirements. Fonts with the letter 'H' in the font name are human-readable versions. The last characters in the Code 128 barcode font name determine the height of the barcode with the shortest being 'XXS' and the tallest being 'XXL'. Because each single font may be printed at various point sizes, there are several combinations of heights and widths that may be produced. TrueType fonts with symbol encoding are also provided, which allow the font name to be more visible in font drop down lists of end-user Windows applications and are signified with the letter 'Y' or the word 'Symbol' in the font name. The N Dimension column in the chart below is the narrow bar width to height ratio.
Purchased Font Name | Evaluation Font Name* | Font Height at 12pts* | N Dimension |
Code 128 Fonts (no text below barcode) | |||
IDAutomationC128XXS | IDAutomationSC128XXS | .10' or .254 CM | 10 |
IDAutomationC128XS | IDAutomationSC128XS | .20' or .508 CM | 20 |
IDAutomationC128S | IDAutomationSC128S | .35' or .889 CM | 35 |
IDAutomationC128M | IDAutomationSC128M | .50' or 1.27 CM | 50 |
IDAutomationC128L | IDAutomationSC128L | .60' or 1.46 CM | 58 |
IDAutomationC128XL | IDAutomationSC128XL | .75' or 1.90 CM | 75 |
IDAutomationC128XXL | IDAutomationSC128XXL | 1' or 2.54 CM | 100 |
Code 128 Fonts 'Character set B' (text below barcode:**) | |||
IDAutomationHbC128XS | NA | .20' or .508 CM | 20 |
IDAutomationHbC128S | NA | .35' or .889 CM | 35 |
IDAutomationHbC128M | IDAutomationSHbC128M | .50' or 1.27 CM | 50 |
IDAutomationHbC128L | NA | .60' or 1.46 CM | 58 |
IDAutomationHbC128XL | NA | .75' or 1.90 CM | 75 |
IDAutomationHbC128XXL | NA | 1' or 2.54 CM | 100 |
Code 128 Fonts 'Character set C' (text below barcode:**) | |||
IDAutomationHcC128XS | NA | .20' or .508 CM | 20 |
IDAutomationHcC128S | NA | .35' or .889 CM | 35 |
IDAutomationHcC128M | IDAutomationSHcC128M | .50' or 1.27 CM | 50 |
IDAutomationHcC128L | NA | .60' or 1.46 CM | 58 |
IDAutomationHcC128XL | NA | .75' or 1.90 CM | 75 |
IDAutomationHcC128XXL | NA | 1' or 2.54 CM | 100 |
* Measurements are approximate and were measured when printed at 12 points, which should work for most scanners. Measurements for Human Readable fonts do not include the text below. To print at a different height, find the font that has the height closest to what is needed and use the following formula to find the point size that is needed: ** The human-readable versions also work with IDAutomation's font encoder tools. Nevertheless, they are not usually used because the Code 128 symbology MOD103 check digit is commonly displayed in the result. Human readable versions are often used for testing purposes or when it is not a problem to have the symbology check digit displayed. To print the human-readable data without the check digit, use the fonts beginning in IDAutomationC128 and print the data encoded as text below or above the barcode. The XXS size is not available in the human readable versions because of size limitations. |
Code 128 Barcode Font Names Prior to July, 2003
Purchased Font Name | Evaluation Font Name* | Font Height at 12pts* |
Code 128 Fonts (no text below barcode) | ||
AdvC128a | sAdC128a | 1/16' (.078') or .2 cm |
AdvC128b | sAdC128b | 1/8' (.125') or .4 cm |
AdvC128c | sAdC128c | 1/4' (.25') or .6 cm |
AdvC128d | sAdC128d | 1/2' (.5') or 1.1 cm |
AdvC128e | sAdC128e | 5/8' (.625') or 1.6 cm |
AdvC128f | sAdC128f | 1' or 2.5 cm |
Code 128 Fonts 'Character set B' (text below the barcode:**) | ||
C128bHa | NA | 1/16' (.078') or .2 cm |
C128bHb | NA | 1/8' (.125') or .4 cm |
C128bHc | sC128bHc | 1/4' (.25') or .6 cm |
C128bHd | NA | 1/2' (.5') or 1.1 cm |
C128bHe | NA | 5/8' (.625') or 1.6 cm |
C128bHf | NA | 1' or 2.5 cm |
Code 128 Fonts 'Character set C' (text below barcode:**) | ||
C128cHa | NA | 1/16' (.078') or .2 cm |
C128cHb | NA | 1/8' (.125') or .4 cm |
C128cHc | sC128cHc | 1/4' (.25') or .6 cm |
C128cHd | NA | 1/2' (.5') or 1.1 cm |
C128cHe | NA | 5/8' (.625') or 1.6 cm |
C128cHf | NA | 1' or 2.5 cm |
Technical Support
Free lifetime Level 1 support may be obtained by reviewing the knowledgebase articles that are documented and by searching resolved public forum threads or the Code-128 tag. One incident of Level 2 support for a period of 60 days is included with the purchase of any license. Level 2 support and upgrades may be provided beyond 60 days if the Level 2 Support and Upgrade Subscription is purchased when making the or
If assistance is needed, please contact IDAutomation.