LabelQueueClient-Side

100% Private Offline Barcode & Label Suite

Code 128 Barcode Generator - Free High-Density Alphanumeric Vector SVG & PDF

Free online Code 128 barcode generator. Auto-switching Code 128A, 128B, 128C subsets. Generate vector SVG, PNG, and print batch serialized sheets onto Avery labels instantly.

100% Client-Side Sandbox

Loading Code 128 Engine...

Code 128 Symbology Manual: ISO/IEC 15417 Specifications, Subsets & Scannability

Introduced by Computer Identics Corporation in 1981 and standardized globally under ISO/IEC 15417, Code 128 is widely recognized as the most versatile, high-density linear barcode in modern industrial computing. Unlike older legacy symbologies such as Code 39 (which requires wide inter-character gaps and represents only 43 characters) or Interleaved 2 of 5 (which is restricted to numeric pairs), Code 128 can encode all 128 characters of the standard 7-bit ASCII table using a four-bar/four-space modular structure with built-in bidirectional scanning capability.

The Anatomy of a Code 128 Symbol

Every Code 128 barcode consists of six discrete components arranged from left to right:

  • Left Quiet Zone: A blank white margin measuring at least 10X (ten times the narrow bar width) or 0.25 inches.
  • Start Character: A unique 11-module pattern designating whether the symbol begins in Subset A, Subset B, or Subset C.
  • Data Characters: Each encoded character occupies exactly 11 modules composed of 3 bars and 3 spaces (except the stop pattern). The sum of bar widths is always even, and space widths always odd, enabling the scanner to perform instant parity self-checking.
  • Modulo 103 Check Character: A mathematically calculated symbol verifying complete optical scan integrity.
  • Stop Pattern: A 13-module pattern composed of 4 bars and 3 spaces with a final termination bar.
  • Right Quiet Zone: A blank margin measuring at least 10X or 0.25 inches.

Automatic Subset Optimization: A, B, and C

The secret to Code 128's extreme spatial density is its dynamic character set shifting:

SubsetCharacter RangePrimary Industry Use
Subset AASCII 00 to 95 (Digits, Uppercase, Control Characters like CR, LF, TAB)Industrial automation, PLC robotics, serial command inputs
Subset BASCII 32 to 127 (Digits, Uppercase, Lowercase, Punctuation)Inventory SKUs, serial numbers, mixed alphanumeric tracking
Subset C100 Digit Pairs (00 to 99) encoded into single 11-module charactersGS1-128 shipping container codes, postal tracking numbers

LabelQueue's native bwip-js engine evaluates your input string and automatically inserts optimal shift and latch codes. For example, if you enter an alphanumeric prefix followed by 10 digits (e.g. “INV-9812401824”), the engine renders “INV-” in Subset B and switches dynamically to Subset C for the numerical sequence, shrinking the physical barcode footprint by up to 35%.

Print Verification & Scanner Compatibility

To maintain an ISO/IEC 15416 print quality grade of A or B (readability rate above 99.5%):

  1. Avoid Scaling Distortions: Never scale barcode bitmap images non-proportionally in desktop publishing tools. LabelQueue outputs direct vector SVG and vector PDF, guaranteeing that narrow bars and wide bars maintain their strict integer ratios.
  2. Respect Narrow Bar Dimensions (X-Dimension): For handheld retail and warehouse scanners, maintain an X-dimension between 10 mil and 15 mil (0.25 mm to 0.38 mm). Very fine 5 mil barcodes require high-resolution 600+ DPI imagers.
  3. Ensure Adequate Bar Height: Ensure bar height is at least 15% of the total symbol length or 0.25 inches (6.3 mm), allowing laser raster lines to intersect all bars during angled scanning.

Frequently Asked Questions

Frequently Asked Technical Questions

Everything you need to know about physical margin calibration, print scale, and barcode readability.

Code 128 is a high-density, variable-length linear (1D) barcode symbology defined by ISO/IEC 15417. It can encode all 128 ASCII characters (including numbers, uppercase and lowercase letters, and control codes). Its compact structure and high data integrity make it the standard for inventory management, shipping container codes (GS1-128), and retail supply chain tracking.