Code 128 Barcode: Size, Structure and Check Digit

Barcodes · General-purpose linear codes

Code 128: Linear (1D). Data: Variable. Error checking: Modulo 103 (mandatory). Standard: ISO/IEC 15417. Typical use: Shipping labels, inventory, any alphanumeric ID; densest common linear code.

Type
Linear (1D)

Drawing

utilunit
Real, scannable Code 128 (set B) for utilunit, with its modulo-103 check character.

Code 128 specifications

TypeLinear (1D)
Character setAll 128 ASCII characters (code sets A, B, C)
Data lengthVariable
Check digit / error correctionModulo 103 (mandatory)
StandardISO/IEC 15417
Quiet zone10 X each side
Typical useShipping labels, inventory, any alphanumeric ID; densest common linear code

Code 128 switches between three code sets: A (upper case and control characters), B (upper and lower case) and C (pairs of digits, so numeric data takes half the space). A modulo-103 check character is always included and never printed.

All barcode types

Compare all 17 barcode types →

Sources

  1. GS1 General Specifications (Release 24.0): §5 symbol specifications, symbol specification tables
  2. GS1: How to calculate a check digit manually
  3. GS1 Sweden: Barcode size guide (X-dimension and height tables)
  4. GS1 UK: How big should an ITF-14 barcode be?
  5. ISO/IEC 15420 (EAN/UPC), 15417 (Code 128), 16388 (Code 39), 16390 (ITF), 24724 (GS1 DataBar)
  6. ISO/IEC 18004 (QR Code), 16022 (Data Matrix), 15438 (PDF417), 24778 (Aztec Code)
  7. JsBarcode (MIT): Code 128 / Code 39 / Codabar pattern tables used to cross-check the drawings

Values last checked against these sources on November 15, 2026. · How we check data

Reference values for planning and identification. Confirm critical dimensions with the manufacturer's drawing or the current edition of the standard before production.