Barcode Fonts, Components, ActiveX and .NET Windows Forms Controls, Java Servlets, 
DLLs and Barcode Scanners.                IDAutomation.com, Inc., Computers Hardware, Software & Services, Tampa, FL                  View your cart in the IDAutomation Store           
Home > Code 128 Fonts > Code 128 Font FAQ:

Code 128 Specifications & Data Sheet

Order Code 128 Barcode Fonts Download Code 128 Demo Specifications | Overview | Manual Check Character Calculation

Code 128 Barcode Symbology Data Sheet

Three different start characters are used with Code 128 Barcodes to tell the barcode reader which character set is in use. If using character sets A or B, create the output by selecting the Code 128 font and entering the appropriate letter from the keyboard with the exception of the space character barcode, extended functions and the start / stop characters. For more information on this function, please view the page on printing extended barcode characters.

The data sheet below illustrates the three different character sets and the ASCII location to print the character. Listed in columns A, B and C are the character or function the barcode scanner will read for the associated symbol. The columns ASCII, Char and Unicode are unique to IDAutomation Code 128 Barcode Fonts. These columns designate the location in either ASCII or Unicode where the barcode symbol for the character resides. The column Char lists the character that resides at the ASCII location, which can be used to print the corresponding symbol. The IDAutomation character set provides easy methods of encoding functions such as returns and tabs in the barcode.

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                

* Windows cannot print a symbol instead of a space character from Visual Basic and most other development environments. Use ASCII 194 instead of ASCII 32 to create the Code 128 space character.

** Mac systems should print the Code 128 font from Unicode locations if possible because the extended characters map to different characters than what is displayed on the "Char" column in Mac Roman encoding. Visit the Code 128 FAQ page for more information.

Manual Code 128 Check Character Calculation

NOTE: IDAutomation provides Free Font Encoders and Source Code Samples that format the start, stop and check characters to Code 128 Barcode Fonts. Thus, 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:

  1. Reference the table above to obtain the value of the start character and all data characters.
  2. Assign a weight 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.
  3. Multiply the character values by their weights for the data characters.
  4. Find the sum of the start character and all data character weights and divide by 103.
  5. Use the above data sheet to locate the character that has the value of the total in #4. Use this as the check character.
Calculating Character Set A or B

The table below shows 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  
  1. Calculate Total: 104 + (66*1) + (73*2) + (90*3) = 586
  2. 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.

To encode extended ASCII characters from the keyboard that do not have keys defined, use the ALT+<xxxx> 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. The keypad must be used to do this. 

To encode the data "biz" as a barcode, type: ALT 0204, b, i, z, g, ALT 0206 or bizg. Click here for more information on encoding fonts with extended ASCII characters or use IDAutomation's Free Font Tools.

Calculating Character Set C

The table below is an example of how to obtain the check character for "667390" using Code 128 Character Set C. First, the number will have to be interleaved into pairs and then the appropriate character that represents the number pair should be selected.

  Start C 66 73 90 STOP
weighting   1 2 3  
values 105 66 73 90  
totals 105 66 146 270  
  1. Calculate Total: 105 + (66*1) + (73*2) + (90*3) = 587
  2. Calculate 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.

To encode "667390" as a barcode, type: ALT 0205, b, i, z, h, ALT 0206 or bizh.

Switching Character Sets Within a Barcode

It is possible to switch between character sets in a single Code 128 barcode symbol. Although character set B can encode text and numbers, it may require the user to switch to set A to encode a function such as a tab or carriage return.

The table below provides an example of how to encode "biz" using Code 128 Character Set B, then 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  
  1. Calculate Total: 104 + (66*1) + (73*2) + (90*3) + (101*4) + (77*5) = 1375
  2. 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.

Switching between character sets can also be done with IDAutomation Free Font Tools. For example, if the data is bizm ( 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 bizmD would be returned, which would perform the switch to set A and the function of a return when created with IDAutomation fonts and scanned by a barcode scanner.

Calculating for UCC/EAN-128

The FNC1 is treated as a different character, so the calculation will have to be figured in. Here is how to calculate (00)1234(15)12 which would be 0012341512 in IDAutomation's Font Tools. Look at the chart to pair up the numbers with letters. More information about creating UCC/EAN128 barcodes is provided in the Code 128 FAQ.

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
  1. Add up totals: = 1063
  2. Calculate Checksum: 1063 divided by 103 = 10 remainder of 33. Check digit = value of 33.

According to the chart, ,B/,A will be needed to create the barcode from the font.

Code 128 Barcode Specifications

The X dimension (X is the width of the narrow bar) is listed below for various point sizes.

IDAutomation Code 128 Barcode Fonts have been specially designed to produce dependable and scanable barcodes when printed at large and small point sizes. The Code 128 font can be printed as small as 6 points with a 600 DPI laser printer, assuming the barcode scanner can read a barcode that small. IDAutomation testing has dependably scanned very small Code 128 Barcodes with the IDAutomation Plug 'n Play USB Barcode Scanner - as small as 4 points.

Please be aware that Code 128 fonts should be printed at 12 points or larger for open systems.

Point Size Approximate X dimension
48 .85 mm .032"
36 .63 mm .024"
24 .42 mm .016"
20 .35 mm .013"
16 .28 mm .011"
12 .21 mm .008"
8 .14 mm .006"
6 .105 mm .004"

* To print at a different X dimension, find the point size that has the X dimension closest to what is needed and use this formula to find the point size needed:
12 * (X dimension needed) / (X dimension at 12 points) = (point size) For example, to set an X dimension of 12 mils, print it at 14 points because:
12 * 12 / 10 = 14

Eighteen different versions of Code 128 Barcode Fonts are provided to support human-readable versions and different height/width requirements. Fonts with the letter "H" in the font name are "human readable" versions more about these versions. The last characters in the Code 128 barcode font name determines the height of the barcode with the shortest being "XS" and the tallest being "XXL". Because each font can be printed at various point sizes, there are several combinations of heights and widths that can be produced. (Click to view font names prior to July, 2003)

Purchased Font Names Demo Font Names* Font Height at 12 Points*
Code 128 Fonts - Text Below Barcode
IDAutomationC128XS IDAutomationSC128XS  1/16" (.078") or .2 cm
IDAutomationC128S IDAutomationSC128S  1/8" (.125") or .4 cm
IDAutomationC128M IDAutomationSC128M  1/4" (.25") or .6 cm
IDAutomationC128L IDAutomationSC128L  1/2" (.5") or 1.1 cm
IDAutomationC128XL IDAutomationSC128XL  5/8" (.625") or 1.6 cm
IDAutomationC128XXL IDAutomationS128XXL  1"  or 2.5 cm
Code 128 B Fonts - Text Below Barcode **
IDAutomationHbC128XS NA  1/16" (.078") or .2 cm
IDAutomationHbC128S NA  1/8" (.125") or .4 cm
IDAutomationHbC128M IDAutomationSHbC128M  1/4" (.25") or .6 cm
IDAutomationHbC128L NA  1/2" (.5") or 1.1 cm
IDAutomationHbC128XL NA  5/8" (.625") or 1.6 cm
IDAutomationHbC128XXL NA  1"  or 2.5 cm
Code 128 C Fonts - Text Below Barcode **
IDAutomationHcC128XS NA  1/16" (.078") or .2 cm
IDAutomationHcC128S NA  1/8" (.125") or .4 cm
IDAutomationHcC128M IDAutomationSHcC128M  1/4" (.25") or .6 cm
IDAutomationHcC128L NA  1/2" (.5") or 1.1 cm
IDAutomationHcC128XL NA  5/8" (.625") or 1.6 cm
IDAutomationHcC128XXL NA  1"  or 2.5 cm
* Measurements are approximate and printed at 12 points which should work for most scanners. Measurements for Human-Readable fonts do not include the text below. At 12 points, the X dimension is about 8 mils.

* To print at a different X dimension, find the point size that has the X dimension closest to what is needed and use this formula to find the point size needed:
12 * (X dimension needed) / (X dimension at 12 points) = (point size) For example, to set an X dimension of 12 mils, print it at 14 points because:
12 * 12 / 10 = 14

**  The human readable versions also work with IDAutomation's Font Encoders. However, they are not normally used because the Code 128 symbology MOD103 check digit is always displayed in the result. They are often used for testing purposes or when the symbology check digit can be displayed. To print the human-readable data without the check digit, use the fonts beginning with "IDAutomationC128" and then print the data being encoded below or above the barcode.

Font Names Prior to July, 2003

Purchased Font Names Demo Font Names* Font Height at 12 Points*
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 B Fonts - Text Below 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 C Fonts - 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

Code 128 Font Installation Instructions

Note: When printing the Code 128 fonts at less than 15 points, a high quality printer with a 600 DPI or greater resolution should be used. It may also be necessary to reduce the print intensity if it has been increased.

  1. To install TrueType Fonts in Windows, run the Install.exe file included in the download. Otherwise, proceed to step 2.
  2. Click on Start, select Settings and click on Control Panel.
  3. Click on Fonts. Click on File in the main tool bar; select Install New Font.
  4. Select the folder where the Code 128 Font is saved.
  5. The Code 128 Font will appear and look like this: IDAutomationSC128XS (TrueType) Select this font and click OK.
  6. Click Start and restart the computer.
  7. The Code 128 Barcode Font should be active when the computer is restarted.

Installing Fonts on Mac OS X:

  1. Drag or copy and paste the TrueType font file(s) ending in TTF to the Library/Fonts folder.
  2. Restart the application to activate the fonts, although some applications may require a system reboot.
  3. The Code 128 Barcode Font should now be active in the font menu of the application.

Installing TrueType Fonts on the Classic Mac (OS 7.1 - OS 9):

  1. If an expander utility is not already loaded to open ZIP files and decode MacBinary files, download and install Stuffit Expander for Mac.
  2. Open the ZIP distribution file that contains the fonts by dragging the ZIP file on the Stuffit Expander icon. The font files will be extracted from the ZIP distribution file and will appear in a subfolder of the folder the ZIP file was placed in. Open this subfolder to view the font files.
  3. Please view the documentation supplied with the font files. To do so just drag the file "readme.html" to the Safari or Mozilla Firefox icon.
  4. Now the files must be decoded from MacBinary format. Drag the font files desired that end with "mtt" to the Stuffit Expander icon.
  5. Then drag the decoded font files to the System - Fonts folder.
  6. Restart the application to activate the fonts, although some applications may require a system reboot.
Additional Resources

If there are any questions or assistance needed, please contact IDAutomation.

Back to Top

 ©Copyright 2020 IDAutomation.com, All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us

Training Videos on YouTube  Join us on Google Plus  Join us on LinkedIn  Follow us on Twitter  Like us on Facebook
Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.