Code 128 Barcode Font

Code 128 is one of the most popular modern barcodes. It is a high-density barcode supporting alphanumeric characters. This barcode is used as the underlying symbology for many other barcodes like UCC/EAN, HIBC(Health Industry Barcode), and the Blood Bank Industry barcode.

Other than being high density, this barcode supports the ASCII character set and is increasingly adopted in many different applications. This barcode has 106 unique representations and supports ASCII by using a multiple character set mechanism.

Character Set supported in barcode

  • Code128 Auto - Support Code 128 A/B/C characters. Automatically switch between the different code sets and performs characters optimization
  • Code128A - ASCII without lowercase characters
  • Code128B - ASCII without the initial ASCII special characters
  • Code128C - Numeric

Barcode Font Names and Sizes

ConnectCode Code 128 (Auto/A/B/C) barcode font supports up to seven different heights. These barcodes with seven different heights are provided in seven fonts with different names. The barcode names are appended with characters like "S1" or "S2" etc., with each representing a different height. The list below illustrates the seven different fonts that are supplied for Code128.

  • CCode128_S1
  • CCode128_S2
  • CCode128_S3
  • CCode128_S4
  • CCode128_S5
  • CCode128_S6
  • CCode128_S7
Additionally, ConnectCode also provides a font for Code 128B that includes human text. It is shown below.

  • CCode128B_HS3

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'_'
64NUL'`'64'`'
65SOH'a'65'a'
66STX'b'66'b'
67ETX'c'67'c'
68EOT'd'68'd'
69ENQ'e'69'e'
70ACK'f'70'f'
71BEL'g'71'g'
72BS'h'72'h'
73HT'i'73'i'
74LF'j'74'j'
75VT'k'75'k'
76FF'l'76'l'
77CR'm'77'm'
78SO'n'78'n'
79SI'o'79'o'
80DLE'p'80'p'
81DC1'q'81'q'
82DC2'r'82'r'
83DC3's'83's'
84DC4't'84't'
85NAK'u'85'u'
86SYN'v'86'v'
87ETB'w'87'w'
88CAN'x'88'x'
89EM'y'89'y'
90SUB'z'90'z'
91ESC'{'91'{'
92FS'|'92'|'
93GS'}'93'}'
94RS'~'94'~'
95USDEL95227 (ASCII value)
96FNC3FNC396228 (ASCII value)
97FNC2FNC297229 (ASCII value)
98ShiftShift98230 (ASCII value)
99Code CCode C99231 (ASCII value)
100Code BFNC4Code B232 (ASCII value)
101FNC4Code ACode A233 (ASCII value)
102FNC1FNC1FNC1234 (ASCII value)
103Start AStart AStart A235 (ASCII value)
104Start BStart BStart B236 (ASCII value)
105Start CStart CStart C237 (ASCII value)
106StopStopStop238 (ASCII value)


Using the Code 128 barcode font


Code 128 A

To encode "ABCDEF" in Code 128A.
'J' is the check character. The calculation of this character is specified in the next section. 'ë' is the start character of Code 128 A while 'î' is the stop character.

Input: ëABCDEFJî

Output:



Code 128 B

To encode "abcdef" in Code 128B.
'å' is the check character. The calculation of this character is specified in the next section. 'ì' is the start character of Code 128 B while 'î' is the stop character.

Input: ìabcdefåî

Output:



Code 128 C

To encode "12345678" in Code 128C.
'O' is the check character. The calculation of this character is specified in the next section. 'í' is the start character of Code 128 C while 'î' is the stop character.

Input: í,BXnOî

Output:


If you are using the Encoder, it will automatically put in the start/stop characters and generate the check character for you.


Code 128 Auto

It is recommended to use the Encoder or VB macros to generate the barcode if you intend to use Code 128 Auto. For example, to encode "12345678".

Input (Using the Encoder or VB macros): 12345678

Output:






Calculation of Code128 Check Character


Code 128A

Data - ABCDEF

Data CharactersABCDEF
Multiply each of the characters (the Code 128 value) with increasing weight.
Code 128 Value333435363738
Weight*1*2*3*4*5*6
Sum :(33*1) + (34*2) + (35*3) + (36*4) + (37*5) + (38*6) = 763
For Code 128A, add an additional of 103 to the sum above
Total763 + 103 = 866
Modulo 103 Check Character:866 % 103 = 42 (which maps to the character 'J')


Code 128B

Data - abcdef

Data Charactersabcdef
Multiply each of the characters (the Code 128 value) with increasing weight.
Code 128 Value656667686970
Weight*1*2*3*4*5*6
Sum :(65*1) + (66*2) + (67*3) + (68*4) + (69*5) + (70*6) = 1435
For Code 128B, add an additional 104 to the sum above
Total1435 + 104 = 1539
Modulo 103 Check Character:1539 % 103 = 97


Code 128C

Data - 345678

Data Characters345678
Multiply each of the two digits with increasing weight.
Weight*1*2*3
Sum :(34*1) + (56*2) + (78*3) = 380
For Code 128C, add an additional 105 to the sum above
Total380 + 105 = 485
Modulo 103 Check Character:485 % 103 = 73 (which maps to the character 'i')