Code 128

Code 128

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 the major component of the labeling standard for GS1-128 (formerly known as UCC/EAN-128), used as product identification for container and pallet levels of retail markets. The symbology is formerly defined as ISO/IEC 15417:2007.


A Code 128 barcode will have six sections:

  • Quiet Zone
  • Start Character
  • Encoded Data
  • Check Character
  • Stop Character
  • Quiet Zone

The check character is calculated from a modulo 103 calculation of the weighted sum of all the characters.

Code 128 barcodes may be generated specifically as 128A, 128B or 128C. Usual usage involves automatic switching between these subtypes depending on the data to be encoded.

  • 128A - ASCII characters 00 to 95 (0-9, A-Z and control codes) and special characters
  • 128B - ASCII characters 32 to 127 (0-9, A-Z, a-z) and special characters
  • 128C - 00-99 (double density encoding of numeric only data)

;Quiet Zone
The quiet zone should be at least ten times the width of the narrowest bar/space element.

;Start/Stop and Encoded Data
Each character in the barcode symbol is composed of three bars and three spaces. (The stop character has four bars and three spaces as the final symbol will always have a final (extra) bar.) Each encoded character contains eleven elements, where each element may be considered to be part of a bar or a space. Each bar and space contains up to three 'elements,' where the thickness of the bar or space is determined by the amount of elements. For instance, encoding the ASCII value 0 can be viewed as 10011101100, where a 1 is a bar and a 0 is a space. A combination which contains a single 1 would be the thinnest line in the bar code. A combination including three 1 (111) in sequence indicates a bar three times as thick as a single 1 bar. More information is available at Barcode Island

;Check Digit Calculation
The check digit is a Modulus 103 checksum. It is calculated by summing the start code 'value' to the products of each character's 'value' multiplied by its position in the barcode string. The left most character is position 1. The sum of the start code value and the products is divided by 103. The remainder is the check digits 'value'.;Calculating Check Digit With Multiple Variants As Code 128 allows multiple variants, as well as switching between variants within a single barcode, it is important to remember that the absolute Code 128 value of a character is completely independent of its value within a given variant. For instance the Variant C value "33" and the Variant B value "A" are both considered to be a Code 128 value of 33, and the check digit would be computed based on the value of 33 times the character's position within the barcode. A complete table of Variant B and C values, as well as algorithmic conversion between Code 128 values and ASCII values, is available here;Availability For the end user, Code 128 barcodes may be generated by either an outside application to create an image of the barcode, or by a font based barcode solution. Either solution requires the use of an application or an application add in to calculate the check digit and create the barcode. ;;Font:;* Free Barcode Fonts;* Azalea;* ID Automation;;Image:;* Barcode Alpha

Search another word or see Code 128on Dictionary | Thesaurus |Spanish
Copyright © 2015, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature