Karuvii LogoKaruvii
Back to Insights
7 min read

Understanding Code 128 Barcodes

What is Code 128?

Code 128 is a highly compact, high-density linear barcode symbology defined by the international standard ISO/IEC 15417. Unlike simpler barcodes (such as Code 39), which are limited in character density, Code 128 can encode all 128 characters of the standard ASCII table. This comprehensive capability makes it the industry standard for logistics, shipping labels, inventory management, and global supply chains.

Industrial Barcode Synthesis

Generate GS1-compliant Code 128 barcodes for logistics and inventory management.

Generate Industrial Barcodes

Structure and Symbology Layout

A Code 128 barcode is read from left to right and is constructed using the following precise layout:

  • Quiet Zone: A required clear white space on both ends (minimum of 10 times the width of the narrowest bar).
  • Start Character: A unique pattern indicating the start subset (Start A, Start B, or Start C).
  • Data Payload: Encoded characters representing the actual text/number input.
  • Checksum Character: A mandatory Modulo 103 checksum character used by scanner devices to verify readability.
  • Stop Character: A specific stop sequence marking the end of the barcode structure.

The Three Character Subsets

To maximize encoding density, the Code 128 standard defines three distinct character subsets:

  • Code 128A: Encodes standard uppercase alphanumeric characters, punctuation, and control codes (like NUL, SOH, CR, LF).
  • Code 128B: Encodes all standard alphanumeric characters, punctuation, and lowercase letters.
  • Code 128C: Specially optimized for numeric data. It compresses pairs of numbers into a single barcode character pattern. This doubles the data density for digit sequences (e.g., zip codes, serial numbers, and GTIN codes).

Advanced barcode synthesis engines dynamically switch between these subsets within a single barcode symbol (using special Shift or Code characters) to achieve the smallest possible physical width for any given input string.

GS1-128 and Application Identifiers

A key application of Code 128 is the GS1-128 specification (formerly known as UCC/EAN-128). GS1-128 defines a standard structure for logistics tags, encoding metadata using Application Identifiers (AIs). These AIs are prefix codes (such as "01" for GTIN, "10" for batch number, "17" for expiration date) enclosed in parentheses. Scanners read these prefixes to parse complex data structures from a single scan, supporting product tracking from manufacturing plants to retailer storefronts worldwide.

Industrial Barcode Synthesis

Generate professional-grade barcodes in Code 128, EAN, and UPC formats on Karuvigal.

Open Karuvigal

Continue Reading