Skip to main content

Free Online CODE 128 Barcode Generator

CODE128 Mode

Code 128 is one of the most versatile linear barcodes for logistics, warehousing, and internal asset tracking. Enter alphanumeric data, validate it against printable ASCII rules, and download a scannable image in seconds.

1. Enter barcode data

0 entries · Blank lines ignored · Duplicate values detected

2. Choose barcode settings

3. Generate

Barcode preview

Download settings

What is a CODE128 barcode?

CODE128 is a high-density linear barcode that encodes the full ASCII character set using three interchangeable code sets (A, B, and C). Scanners and label software widely support it for shipping labels, warehouse bins, document tracking, and logistics identifiers when your workflow expects Code 128 encoding.

Unlike fixed-length retail barcodes, Code 128 accepts variable payloads, which makes it useful when a label must carry an internal SKU, lot reference, or shipment ID rather than a globally registered product number. This page locks the generator to standard Code 128 rules so preview, validation, and download stay aligned with the value you enter.

Recommended generator settings

These defaults work well for preview and download. Adjust to match your label template or scanner tests.

Bar width Start at 2; increase only if scans fail at your print size
Height 100 px or taller for warehouse and logistics labels
Quiet zone Keep the default margin unless your spec defines a different quiet zone
Readable text Leave enabled when operators verify values manually
Output format PNG for design files; JPEG for documents and quick sharing

Practical examples

  • CT-001
  • SKU-88421
  • LOT-2026-A
  • INV-004521

When should you use CODE128?

  • Warehouse and inventory labels where the encoded value mixes letters and numbers
  • Shipping and logistics documents that require compact, scannable identifiers
  • Internal asset tags and equipment tracking outside fixed retail numbering schemes
  • Batch label generation when each item needs a unique alphanumeric code

Limitations and common mistakes

Choose a retail symbology such as EAN-13 or UPC-A when a store POS system expects a fixed-length product number. Use CODE39 if a legacy industrial scanner only supports that format.

  • Trimming quiet zones when cropping the image for a label layout.
  • Scaling the barcode unevenly so bar width ratios no longer match the generated image.

Related formats

CODE128 vs CODE39

Format Best for Supported data Key difference
Code 39 Industrial part numbers and work-in-process tracking on shop floors 0–9, A–Z, space, and - . $ / + % Simpler character set and long legacy support in automotive and government systems, but wider bars for the same data.
Code 128 Set C Long numeric shipment or container references on warehouse labels Digits 0–9 only An even-length string of 0–9 encoded two digits at a time.
Code 128 Set B Mixed-case SKU or order references on packing slips and pick lists Printable ASCII (space through ~, codes 32–126) Uppercase and lowercase letters with digits and punctuation.

Back to the main barcode generator · Compare all barcode types

Printing and scanning notes

Printing

  • Maintain clear quiet zones on both sides of the bars before trimming labels.
  • Use high contrast (dark bars on a light background) for reliable laser and imager scans.
  • Test print size with your scanner; very small Code 128 symbols may fail on older hardware.

Scanning

  • Most modern handheld and fixed scanners read Code 128 by default.
  • Ensure the human-readable text below the bars matches the encoded value if your spec requires it.
  • Avoid glossy label stock that creates specular reflection over narrow bars.

Frequently asked questions

This generator accepts printable ASCII characters (codes 33 through 126). Spaces and control characters are not supported in the input validator.

Yes. The encoder adds a modulo-103 check character automatically; you only enter the data payload.

Yes. Enter one value per line with batch mode enabled to create multiple Code 128 images in one run.

GS1-128 uses Code 128 encoding with defined application identifiers. This tool renders the barcode image from the value you supply; confirm the full data structure with your trading partner if required.

Use standard CODE128 for general ASCII data. Choose A, B, or C subsets only when your label spec or encoder explicitly requires that code set.

The validator allows printable ASCII only. Remove spaces, tabs, or non-printable characters and try again.

Yes. After generation, download the previewed image in your selected format for labels or documents.