SourceForge Project Page

Code 128

see also: UCC/EAN-128, GS1-128


Example Code 128 symbol


The configuration for the default implementation is:

      <quiet-zone enabled="{boolean:true}">{length:10mw}</quiet-zone>


  • The height should be at least 0.15 times the barcode's length or 0.25 inches.
  • Code 128 codesets can be restricted to A, B, C or a combination of the three. Example: "AB" enables A and B. "C" just enables C and therefore only allows an even number of digits.

Message format

  • Valid characters: The full 7 bit ASCII (US-ASCII) character set is supported
  • Functions 1 to 4 may be used. They are encoded as ASCII characters 0xF1 (241), 0xF2 (242), 0xF3 (243) and 0xF4 (244) in the message.
  • Unlike with barcode fonts, the start, stop and checksum character shall NOT be part of the message as they are added automatically.