Subsets, GS1-128, and the Check Character
Three subsets and automatic switching
Code 128 defines three character subsets, and a single barcode can switch between them mid-string. Subset A covers uppercase letters, digits, and ASCII control characters. Subset B covers uppercase and lowercase letters plus digits. Subset C is the interesting one: it encodes two digits per 11-module symbol instead of one character, which makes a purely numeric value roughly twice as dense as the same value in subset A or B.
Our generator picks the optimal subset automatically and inserts shift codes where switching mid-string produces a shorter barcode. A 20-digit numeric value encoded in subset C occupies about the same physical width as a 10-character alphanumeric value in subset B. This is why a numeric-only SKU scheme fits on a smaller label than a mixed alphanumeric one of the same character count — worth knowing if you are still designing your SKU format.
The modulo-103 check character
Code 128 requires a check character, which the encoder derives by summing the weighted values of each symbol and taking the remainder modulo 103. Unlike UPC-A or EAN-13, this check character is not printed in the human-readable line — it exists purely inside the bar pattern. You never enter or calculate it, and a scanner that reads a Code 128 barcode has already verified it before reporting the value.
GS1-128 is Code 128 with a specific first character
GS1-128 (formerly UCC/EAN-128) is not a separate symbology. It is a Code 128 barcode whose first data character is the FNC1 function character, signalling to the scanner that the payload follows GS1 Application Identifier syntax — structured fields such as (01) for GTIN, (10) for batch/lot, (17) for expiry date. Retail and pharmaceutical supply chains use GS1-128 on shipping cases. If a distributor asks for "GS1-128", they need the AI-formatted payload, not a different barcode type.
History: Code 128 was developed in 1981 by Computer Identics and standardised as ISO/IEC 15417. Its combination of full ASCII support, high density, and zero licensing cost is why it displaced Code 39 as the default choice for internal-use barcodes across logistics and manufacturing.