SDK Documentation Help

Code 128

Code 128 is a compact, variable-length linear barcode symbology, developed in 1981 and standardized as ISO/IEC 15417. It is used extensively in logistics, healthcare, transportation, and the most widely used 1D symbology outside of retail.

A sample Code 128 barcode is shown below.

Sample Code 128 barcode

Symbology Characteristics

Configuration name

code128

ISO specification

ISO/IEC 15417:2007

Encodable character set

All 128 ISO/IEC 646 (ASCII) characters, i.e. characters 0 to 127 inclusive, and characters with byte values 128-255

Integrity protection

Mandatory checksum character

Quiet zone

Leading and trailing quiet zone of ten modules (10X) is required

Configuration Options

Option

Description

Sample Configuration

Default

minLen

The minimum length of scanned codes

const config = { engine: { symbologies: [ { name: "code128", minLen: 8 } ] } }

4

maxLen

The maximum length of scanned codes

const config = { engine: { symbologies: [ { name: "code128", maxLen: 16 } ] } }

32

qz

The minimum size of the quiet zone, in modules (X)

const config = { engine: { symbologies: [ { name: "code128", qz: 10 } ] } }

5

GS1-128 (formerly UCC/EAN-128)

GS1-128 is a subset of a Code 128 which encodes structured information in Application Identifiers (AIs), such as a GTIN, a lot number, etc.

For example, the GS1-128 barcode below encodes a GTIN 40614141006364, a production date 220101 (YYMMDD) in AI 11 of and a batch or lot number A1B2C3D4 in AI 10.

Sample GS1-128 barcode

Last modified: 11 September 2024