Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Code 128
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Bar code widths=== Code128 specifies a combination of 6 alternating bars and spaces (3 of each) for each symbol. Thus, each symbol begins with a bar and ends with a space. In barcode fonts, the final bar is generally combined with the stop symbol to make a wider stop pattern. The following table details the widths associated with each bar and space for each symbol. The width of each bar or space may be 1, 2, 3 or 4 units (modules). Using the example above, an 'A' would be depicted with the pattern 10100011000, or as widths 111323 in the tables below. The widths value is derived by counting the length of each run of 1's then 0's in the pattern, starting from the left. There will always be 6 runs and the lengths of these 6 runs form the Widths value. For example, using the pattern 10100011000, the run lengths are 1 (digit 1), 1 (digit 0), 1 (digit 1), 3 (digit 0), 2 (digit 1), 3 (digit 0). Reporting just the lengths of each run gives 1, 1, 1, 3, 2, 3, thereby producing a widths value of 111323. {| class="wikitable sortable" border="1" style="text-align:center" |+ Code 128 |- !rowspan=2| Value !rowspan=2| Hex value !rowspan=2| 128A !rowspan=2| 128B !rowspan=2| 128C !colspan=2| Font position<br/>(Common/Uncommon/Barcodesoft) !colspan=2| Bar/Space |- ! Code ! [[Latin-1]] ! Pattern ! Widths |- | 0 | 00 | [[Space (punctuation)|space]] | space | 00 | 32 or 194 or 207 / 212 / 252 | [[Whitespace character|␣]] or  or Ï / Ô / ü | 11011001100 | 212222 |- | 1 | 01 | ! | ! | 01 | 33 | ! | 11001101100 | 222122 |- | 2 | 02 | " | " | 02 | 34 | " | 11001100110 | 222221 |- | 3 | 03 | # | # | 03 | 35 | # | 10010011000 | 121223 |- | 4 | 04 | $ | $ | 04 | 36 | $ | 10010001100 | 121322 |- | 5 | 05 | % | % | 05 | 37 | % | 10001001100 | 131222 |- | 6 | 06 | & | & | 06 | 38 | & | 10011001000 | 122213 |- | 7 | 07 | ' | ' | 07 | 39 | ' | 10011000100 | 122312 |- | 8 | 08 | ( | ( | 08 | 40 | ( | 10001100100 | 132212 |- | 9 | 09 | ) | ) | 09 | 41 | ) | 11001001000 | 221213 |- | 10 | 0a | * | * | 10 | 42 | * | 11001000100 | 221312 |- | 11 | 0b | + | + | 11 | 43 | + | 11000100100 | 231212 |- | 12 | 0c |, |, | 12 | 44 |, | 10110011100 | 112232 |- | 13 | 0d | - | - | 13 | 45 | - | 10011011100 | 122132 |- | 14 | 0e | . | . | 14 | 46 | . | 10011001110 | 122231 |- | 15 | 0f | / | / | 15 | 47 | / | 10111001100 | 113222 |- | 16 | 10 | 0 | 0 | 16 | 48 | 0 | 10011101100 | 123122 |- | 17 | 11 | 1 | 1 | 17 | 49 | 1 | 10011100110 | 123221 |- | 18 | 12 | 2 | 2 | 18 | 50 | 2 | 11001110010 | 223211 |- | 19 | 13 | 3 | 3 | 19 | 51 | 3 | 11001011100 | 221132 |- | 20 | 14 | 4 | 4 | 20 | 52 | 4 | 11001001110 | 221231 |- | 21 | 15 | 5 | 5 | 21 | 53 | 5 | 11011100100 | 213212 |- | 22 | 16 | 6 | 6 | 22 | 54 | 6 | 11001110100 | 223112 |- | 23 | 17 | 7 | 7 | 23 | 55 | 7 | 11101101110 | 312131 |- | 24 | 18 | 8 | 8 | 24 | 56 | 8 | 11101001100 | 311222 |- | 25 | 19 | 9 | 9 | 25 | 57 | 9 | 11100101100 | 321122 |- | 26 | 1a | : | : | 26 | 58 | : | 11100100110 | 321221 |- | 27 | 1b | ; | ; | 27 | 59 | ; | 11101100100 | 312212 |- | 28 | 1c | < | < | 28 | 60 | < | 11100110100 | 322112 |- | 29 | 1d | = | = | 29 | 61 | = | 11100110010 | 322211 |- | 30 | 1e | > | > | 30 | 62 | > | 11011011000 | 212123 |- | 31 | 1f | ? | ? | 31 | 63 | ? | 11011000110 | 212321 |- | 32 | 20 | @ | @ | 32 | 64 | @ | 11000110110 | 232121 |- | 33 | 21 | A | A | 33 | 65 | A | 10100011000 | 111323 |- | 34 | 22 | B | B | 34 | 66 | B | 10001011000 | 131123 |- | 35 | 23 | C | C | 35 | 67 | C | 10001000110 | 131321 |- | 36 | 24 | D | D | 36 | 68 | D | 10110001000 | 112313 |- | 37 | 25 | E | E | 37 | 69 | E | 10001101000 | 132113 |- | 38 | 26 | F | F | 38 | 70 | F | 10001100010 | 132311 |- | 39 | 27 | G | G | 39 | 71 | G | 11010001000 | 211313 |- | 40 | 28 | H | H | 40 | 72 | H | 11000101000 | 231113 |- | 41 | 29 | I | I | 41 | 73 | I | 11000100010 | 231311 |- | 42 | 2a | J | J | 42 | 74 | J | 10110111000 | 112133 |- | 43 | 2b | K | K | 43 | 75 | K | 10110001110 | 112331 |- | 44 | 2c | L | L | 44 | 76 | L | 10001101110 | 132131 |- | 45 | 2d | M | M | 45 | 77 | M | 10111011000 | 113123 |- | 46 | 2e | N | N | 46 | 78 | N | 10111000110 | 113321 |- | 47 | 2f | O | O | 47 | 79 | O | 10001110110 | 133121 |- | 48 | 30 | P | P | 48 | 80 | P | 11101110110 | 313121 |- | 49 | 31 | Q | Q | 49 | 81 | Q | 11010001110 | 211331 |- | 50 | 32 | R | R | 50 | 82 | R | 11000101110 | 231131 |- | 51 | 33 | S | S | 51 | 83 | S | 11011101000 | 213113 |- | 52 | 34 | T | T | 52 | 84 | T | 11011100010 | 213311 |- | 53 | 35 | U | U | 53 | 85 | U | 11011101110 | 213131 |- | 54 | 36 | V | V | 54 | 86 | V | 11101011000 | 311123 |- | 55 | 37 | W | W | 55 | 87 | W | 11101000110 | 311321 |- | 56 | 38 | X | X | 56 | 88 | X | 11100010110 | 331121 |- | 57 | 39 | Y | Y | 57 | 89 | Y | 11101101000 | 312113 |- | 58 | 3a | Z | Z | 58 | 90 | Z | 11101100010 | 312311 |- | 59 | 3b | [ | [ | 59 | 91 | [ | 11100011010 | 332111 |- | 60 | 3c | \ | \ | 60 | 92 | \ | 11101111010 | 314111 |- | 61 | 3d | ] | ] | 61 | 93 | ] | 11001000010 | 221411 |- | 62 | 3e | ^ | ^ | 62 | 94 | ^ | 11110001010 | 431111 |- | 63 | 3f | _ | _ | 63 | 95 | _ | 10100110000 | 111224 |- | 64 | 40 | [[Null character|NUL]] | ` | 64 | 96 | ` | 10100001100 | 111422 |- | 65 | 41 | SOH | a | 65 | 97 | a | 10010110000 | 121124 |- | 66 | 42 | STX | b | 66 | 98 | b | 10010000110 | 121421 |- | 67 | 43 | [[End-of-text character|ETX]] | c | 67 | 99 | c | 10000101100 | 141122 |- | 68 | 44 | [[End-of-transmission character|EOT]] | d | 68 | 100 | d | 10000100110 | 141221 |- | 69 | 45 | [[Enquiry (computer communications)|ENQ]] | e | 69 | 101 | e | 10110010000 | 112214 |- | 70 | 46 | [[Acknowledge character|ACK]] | f | 70 | 102 | f | 10110000100 | 112412 |- | 71 | 47 | [[Bell character|BEL]] | g | 71 | 103 | g | 10011010000 | 122114 |- | 72 | 48 | [[Backspace|BS]] | h | 72 | 104 | h | 10011000010 | 122411 |- | 73 | 49 | [[Tab key|HT]] | i | 73 | 105 | i | 10000110100 | 142112 |- | 74 | 4a | [[Line feed|LF]] | j | 74 | 106 | j | 10000110010 | 142211 |- | 75 | 4b | [[Vertical Tab|VT]] | k | 75 | 107 | k | 11000010010 | 241211 |- | 76 | 4c | [[Form feed|FF]] | l | 76 | 108 | l | 11001010000 | 221114 |- | 77 | 4d | [[Carriage return|CR]] | m | 77 | 109 | m | 11110111010 | 413111 |- | 78 | 4e | [[Shift out|SO]] | n | 78 | 110 | n | 11000010100 | 241112 |- | 79 | 4f | [[Shift in|SI]] | o | 79 | 111 | o | 10001111010 | 134111 |- | 80 | 50 | DLE | p | 80 | 112 | p | 10100111100 | 111242 |- | 81 | 51 | DC1 | q | 81 | 113 | q | 10010111100 | 121142 |- | 82 | 52 | DC2 | r | 82 | 114 | r | 10010011110 | 121241 |- | 83 | 53 | DC3 | s | 83 | 115 | s | 10111100100 | 114212 |- | 84 | 54 | DC4 | t | 84 | 116 | t | 10011110100 | 124112 |- | 85 | 55 | [[Negative-acknowledge character|NAK]] | u | 85 | 117 | u | 10011110010 | 124211 |- | 86 | 56 | SYN | v | 86 | 118 | v | 11110100100 | 411212 |- | 87 | 57 | [[End Transmission Block character|ETB]] | w | 87 | 119 | w | 11110010100 | 421112 |- | 88 | 58 | [[Cancel character|CAN]] | x | 88 | 120 | x | 11110010010 | 421211 |- | 89 | 59 | EM | y | 89 | 121 | y | 11011011110 | 212141 |- | 90 | 5a | [[Substitute character|SUB]] | z | 90 | 122 | z | 11011110110 | 214121 |- | 91 | 5b | [[Escape character|ESC]] | { | 91 | 123 | { | 11110110110 | 412121 |- | 92 | 5c | FS | {{pipe}} | 92 | 124 | {{pipe}} | 10101111000 | 111143 |- | 93 | 5d | GS | } | 93 | 125 | } | 10100011110 | 111341 |- | 94 | 5e | RS | ~ | 94 | 126 | ~ | 10001011110 | 131141 |- | 95 | 5f | US | [[Delete character|DEL]] | 95 | 195 / 200 / 240 | à / È / ð | 10111101000 | 114113 |- | 96 | 60 | FNC 3 | FNC 3 | 96 | 196 / 201 / 241 | Ä / É / ñ | 10111100010 | 114311 |- | 97 | 61 | FNC 2 | FNC 2 | 97 | 197 / 202 / 242 | Å / Ê / ò | 11110101000 | 411113 |- | 98 | 62 | Shift B | Shift A | 98 | 198 / 203 / 243 | Æ / Ë / ó | 11110100010 | 411311 |- | 99 | 63 | Code C | Code C | 99 | 199 / 204 / 244 | Ç / Ì / ô | 10111011110 | 113141 |- | 100 | 64 | Code B | FNC 4 | Code B | 200 / 205 / 200 | È / Í / È | 10111101110 | 114131 |- | 101 | 65 | FNC 4 | Code A | Code A | 201 / 206 / 246 | É / Î / ö | 11101011110 | 311141 |- | 102 | 66 | FNC 1 | FNC 1 | FNC 1 | 202 / 207 / 247 | Ê / Ï / ÷ | 11110101110 | 411131 |- | 103 | 67 |colspan=3| Start Code A | 203 / 208 / 248 | Ë / Ð / ø | 11010000100 | 211412 |- | 104 | 68 |colspan=3| Start Code B | 204 / 209 / 249 | Ì / Ñ / ù | 11010010000 | 211214 |- | 105 | 69 |colspan=3| Start Code C | 205 / 210 / 250 | Í / Ò / ú | 11010011100 | 211232 |- | 106 | 6a |colspan=3| Stop | — | — | 11000111010 | 233111 |- | — | — |colspan=3| Reverse Stop | — | — | 11010111000 | 211133 |- | — | — |colspan=3| Stop pattern (7 bars/spaces) | 206 / 211 / 251 | Î / Ó / û | 1100011101011<!-- Figure spaces to align properly--> | 2331112 |} The "Code A", "Code B" and "Code C" symbols cause all following symbols to be interpreted according to the corresponding subcode (i.e. 128A, 128B or 128C). The "Shift" symbol switches a single following symbol's interpretation between subcodes A and B. The encoded ASCII char depends on the actual used barcode-font. Especially the ASCII char of value 0 and of value 95 and above may be defined differently in the font that is installed. The FNC''x'' codes are used for special purposes. FNC1 at the beginning of a bar code indicates a GS1-128 bar code which begins with a 2- 3- or 4-digit ''application identifier'' assigned by the [[Uniform Code Council]], which explains the following digits. For example, application identifier 421 indicates that an [[ISO 3166-1 numeric]] country code and ship-to postal code follows. Thus, the U.S. [[ZIP code]] for the [[White House]] would generally be printed as "(421) 840 20500", but would actually be coded as "<code>[Start C] [FNC1] 42 18 40 20 50 [Code A] 16 [Check symbol 92] [Stop]</code>" FNC2 (message append) can appear anywhere within a barcode to indicate that the barcode reader should store the current string and prepend it to the string of the next barcode that's read. It is not used by GS1-128. FNC3 (initialize) can appear anywhere within a barcode to instruct the barcode reader to initialize or reprogram itself according to the barcode string's instructions. FNC4 is used to represent an extended ASCII character set (see {{Section link||Using FNC4 to encode high (160–255) characters}}). It is not used by GS1-128.<ref>{{Cite journal |date=Jan 2023 |title=5.4.3.4.2 Function characters |url=https://www.gs1.org/genspecs |journal=GS1 General Specifications Standard |series=Version 23.0 |publisher=GS1 AISBL |page=287 |access-date=June 28, 2023}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)