Free Code 128 Barcode Generator

Generate a Code 128 barcode for any alphanumeric string — SKU, serial number, lot code, or any text value. Download a print-ready PNG or true-vector SVG. Nothing is uploaded; everything runs locally in your browser.

Supports all standard characters.9 chars

Label Layout

80% · 53.3 mm
66.7 × 25.4 mm2.63 × 1.00 in

Export & Print

Need bulk generation?
Pro

Batch Label Studio Pro unlocks CSV import, multi-page PDF generation, and up to 10,000 labels per batch.

Unlock Professional

What is Code 128?

Code 128 is a high-density, linear barcode symbology that can encode all 128 ASCII characters — every printable letter, digit, and symbol on a standard keyboard. It is the most widely used 1D barcode format in logistics, warehousing, and internal inventory management.

Unlike UPC-A or EAN-13, Code 128 has no fixed length and requires no registration with GS1. You can encode any value you choose — your own SKU scheme, an order number, a lot code, or a serial number. Code 128 also self-checks: it includes a modulo-103 check character that scanners verify automatically.

Code 128 subtypes: A, B, and C

Code 128 has three internal sub-codes, sometimes called Code Sets A, B, and C:

  • Code Set A — uppercase letters, digits, and ASCII control characters (function codes). Used when control characters are needed.
  • Code Set B — full printable ASCII (uppercase, lowercase, digits, symbols). The most common choice for text and mixed data.
  • Code Set C — digit pairs only (00–99). Encodes numeric-only strings at double density; useful for long numeric sequences.

In practice, barcode rendering libraries (including the one used here) switch automatically between sub-codes within a single symbol to minimise barcode width. You do not need to choose a sub-code manually.

Minimum size for reliable scanning

For typical warehouse and logistics scanning (handheld scanners at arm's length), a Code 128 barcode should be at least 20 mm wide. 25 mm is a comfortable size that scans reliably across most environments. For shelf-edge labels or pallet tags scanned from 1–2 metres, aim for 40–80 mm width.

The height of a Code 128 barcode is flexible — taller bars are generally easier to scan. The GS1-128 variant (Code 128 with a GS1 Application Identifier prefix) specifies a minimum height of 32 mm, but for internal use you can use any height that fits your label.

Code 128 vs GS1-128

GS1-128 is a specific application of Code 128 that uses structured Application Identifiers (AIs) to prefix data with meaning — for example, AI (01) identifies a GTIN, AI (17) identifies an expiry date, and AI (10) identifies a lot number. Major retailers and logistics providers such as Amazon and FedEx require GS1-128 labels for shipments.

For internal inventory (not shipped to a third-party receiving system), plain Code 128 is all you need. Use GS1-128 only when required by a trading partner.

Frequently Asked Questions

Generate Code 128 labels for your entire inventory

Batch Label Studio Pro imports CSV and Excel files and generates thousands of labels locally — no uploads, no server, no subscription.

Get Pro — $29.99

One-time purchase. Works offline.

    More small-business tools: PromptedPaperwork