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
Code 128 specifications
| Type | Linear (1D) |
|---|---|
| Character set | All 128 ASCII characters (code sets A, B, C) |
| Data length | Variable |
| Check digit / error correction | Modulo 103 (mandatory) |
| Standard | ISO/IEC 15417 |
| Quiet zone | 10 X each side |
| Typical use | Shipping 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
Sources
- GS1 General Specifications (Release 24.0): §5 symbol specifications, symbol specification tables
- GS1: How to calculate a check digit manually
- GS1 Sweden: Barcode size guide (X-dimension and height tables)
- GS1 UK: How big should an ITF-14 barcode be?
- ISO/IEC 15420 (EAN/UPC), 15417 (Code 128), 16388 (Code 39), 16390 (ITF), 24724 (GS1 DataBar)
- ISO/IEC 18004 (QR Code), 16022 (Data Matrix), 15438 (PDF417), 24778 (Aztec Code)
- 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.