Skip to content

Code 128 Barcode Generator – High-Density Barcodes for Logistics and Shipping

What Is a Code 128 Barcode?

Code 128 is a high-density linear barcode symbology that can encode the full ASCII character set (128 characters). Developed by Computer Identics Corporation in 1981, it has become the dominant barcode standard for non-retail applications such as shipping labels, warehouse management, healthcare and serial number tracking.

Code 128 achieves its high density by using variable-width bars and spaces, with each character represented by 11 modules arranged in three bars and three spaces. This makes it significantly more compact than older symbologies like Code 39, allowing more data to be encoded in less horizontal space.

The symbology defines three code sets – A, B and C – that can be mixed within a single barcode. Code Set C is particularly efficient for numeric-only data, encoding two digits per symbol character, which makes Code 128 ideal for long numeric sequences like serial numbers and tracking codes.

Technical Specifications

Property Detail
Character set All 128 ASCII characters (0–127), including control characters
Data length Variable (no fixed limit; practical limit ~80 characters)
Code sets A (uppercase + control), B (uppercase + lowercase), C (double-digit numeric)
Check digit Modulo 103 (weighted positional checksum)
Symbology type Linear (1D), continuous, variable-length
Minimum module width Typically 0.191 mm (7.5 mil) for hand-held scanners
Structure Start character + data characters + check digit + stop character + termination bar

The modulo-103 check character provides strong error detection. The weighted calculation multiplies each character’s value by its position, making it virtually impossible for transposed characters to pass undetected.

Common Use Cases for Code 128

  • Shipping and logistics: FedEx, UPS and DHL use Code 128 on shipping labels for tracking numbers and routing codes. Its density allows long alphanumeric identifiers in a compact space.
  • Warehouse management: Inventory location labels, bin identifiers and pick tickets commonly use Code 128 for its full character set and high scan reliability.
  • Healthcare: Patient wristbands, lab specimens and medication packaging use Code 128 to encode patient IDs, accession numbers and lot codes.
  • Serial number tracking: Electronics, automotive parts and industrial equipment use Code 128 to encode mixed alphanumeric serial numbers on labels and nameplates.

How to Create a Code 128 Barcode

  1. 1. Open the Barcode Generator and select Code 128.
  2. 2. Type or paste any text – letters, digits, special characters. The generator automatically selects the most efficient code set combination.
  3. 3. Adjust module width and bar height to match your label size and scanner distance.
  4. 4. Download and test-scan the barcode before production printing.

The generator runs entirely in your browser with no data upload, no account required, and unlimited barcode creation.

Code 128 vs Code 39 – Which Should You Choose?

Feature Code 128 Code 39
Character set Full ASCII (128 characters) 43 characters (A–Z, 0–9, - . $ / + % space)
Density High (11 modules per character) Low (16 modules per character)
Check digit Mandatory (mod 103) Optional (mod 43)
Best for Shipping, logistics, healthcare Government, military, legacy systems

For new applications, Code 128 is almost always the better choice due to its higher density and full character set. Code 39 remains common in government and military contexts where backward compatibility with legacy systems is required.

Related Topics

Create Your Code 128 Barcode Now

Create your Code 128 barcode now – free, no sign-up required.

→ Go to Barcode Generator