What is Barcode Generator Code128?

Code 128 Barcode Generator creates high-density barcodes that encode all 128 ASCII characters. Code 128 is widely used for shipping labels, packaging, and internal inventory because it packs more data into less space than older formats.

Code 128 packs more data per millimetre than older formats because it uses three character subsets (A, B, C) and switches between them on the fly. Subset C encodes two digits per bar group, making numeric data half as wide. The generator picks the optimal subset automatically, validates each input line in batch mode, and exports PNG, SVG, or a multi-label A4 PDF.

How to use

  1. Enter the text or alphanumeric data you want to encode. Code 128 supports letters, numbers, and special characters.
  2. The barcode generates in real time. Adjust bar width, height, and font size to match your label dimensions.
  3. Download as PNG for digital use or SVG for print. The SVG output stays crisp at any size, ideal for shipping labels.

When to use

  • Encoding shipping tracking numbers, container IDs, or carrier reference codes for parcel labels.
  • Internal warehouse bin tags where alphanumeric SKUs like WH-A12-RACK-04 need to fit on a small label.
  • Hospital wristbands or patient sample tubes where data must include letters, digits, and punctuation.

Result

Enter a shipping tracking number like 'SHIP-2024-00847' to create a scannable Code 128 barcode for package labels.

FAQ

What characters can Code 128 encode?
All 128 ASCII characters: uppercase, lowercase, digits, punctuation, space, and the ASCII control codes. That makes it the most flexible of the linear barcodes — much wider character support than Code 39 or UPC.
Why is Code 128 narrower than Code 39 for the same data?
Code 128 subset C compresses pairs of digits into a single character pattern, halving the width for numeric data. Code 39 always uses one pattern per character with extra inter-character gaps, so it grows about 30 to 50% wider for the same digits.
Does the barcode include a checksum?
Yes. Code 128 always appends a modulo-103 check character before the stop bar. The library handles it automatically, so your scanned data will not include the check digit even though the bars do.
What's the minimum print size that still scans reliably?
The narrowest bar (X-dimension) should be at least 0.25 mm for general use and 0.5 mm for forklift or distance scanning. Below 0.2 mm even modern phone cameras start to misread, especially under poor lighting.
Why does the batch panel show some lines as invalid?
Code 128 rejects characters outside ASCII (e.g. accented letters, emoji, non-Latin scripts). If you have invalid lines, strip those characters or use a richer symbology like QR code, which handles UTF-8.

Related Tools