Loading Barcode Mint…

Barcode Mint

Free Online Barcode & QR Code Generator

Linear Barcode

Code 128 Barcode Generator

Code 128 packs any letter, number, or symbol into one of the most compact linear barcodes available, which is why shippers and warehouses default to it.

Open the generator ↓
Preview
100%

01

Symbology

Code 128
All 106 →
02

Data

03

Properties

Properties

2
100
18
10
04

Bulk & batch generate

🔒 Pro

Turn a CSV — or a numbered sequence — into hundreds of barcodes at once, exported as a ZIP of images or a print-ready PDF sheet. Launching with Pro.

Launching soon

Pricing — join the early list

The browser generator stays free forever. Paid plans are for teams who need bulk output and developers who need the REST API at scale — commercial license included. Tell us what you'd use; early-list members get first access and launch pricing.

For the generator

Free $0/forever

What you're using right now

  • 100+ barcode & QR symbologies
  • Live preview & customization
  • PNG & SVG export, no login
  • Copy to clipboard
Available now ✓

For developers — REST API

Priced by requests. Commercial license and self-serve keys included; usage dashboard at launch.

Small $19/mo$190/yr 500 req / mo
Large $499/mo$4,990/yr 50K req / mo
Enterprise Custom Contact us

Get early access + launch pricing

Which features would you actually use? (optional — it helps us decide what to build first)

No spam — one email when it launches. The free tool isn't going anywhere.

What Is a Code 128 Barcode?

Code 128 is a high-density linear barcode symbology capable of encoding all 128 characters of the ASCII table, including letters, digits, punctuation, and non-printable control codes. It was designed in the 1980s as a replacement for older, bulkier symbologies when a label needed to hold mixed alphanumeric data in the smallest possible space. Today it's one of the most widely used barcodes in shipping, logistics, and retail because a single symbol can carry a serial number, a product code, and a date in far less horizontal space than Code 39 would need for the same data.

When people say "Code 128" without qualification, they usually mean the auto-switching version: an encoder that picks whichever of the three internal character sets (A, B, or C) produces the shortest, most efficient barcode for the data you type. Barcode Mint's Code 128 option does exactly this automatically, so you don't have to think about subsets unless you have a specific reason to lock one in.

How Code 128 Encodes Data

Code 128 is built from a series of bars and spaces where each encoded character maps to a pattern of 3 bars and 3 spaces spanning 11 modules. What makes it different from earlier symbologies is that it can switch mid-symbol between three character sets:

A smart encoder inserts shift and code-set characters automatically wherever switching subsets saves space — for example, encoding a long numeric run in subset C even inside a string that starts in subset B. Every Code 128 symbol also carries a mandatory checksum character calculated with a weighted modulo-103 algorithm, plus dedicated start, stop, and quiet zone requirements, which is a major reason it reads reliably even on lower-quality thermal prints.

Where Code 128 Is Used

Code 128 shows up anywhere labels need to be compact but data-rich:

How to Create a Code 128 Barcode in Barcode Mint

Open Barcode Mint and select Code 128 from the symbology list on the left — it's grouped under linear barcodes alongside Code 128 A, B, and C if you need explicit subset control. Type or paste your data into the input field; the preview updates live as you type, so you can confirm the encoded result before exporting. From there:

For runs of sequential serial numbers or SKUs, use the batch/sequence feature to generate a numbered series in one pass. If you're labeling hundreds of items from a spreadsheet, the bulk CSV → ZIP/PDF tool turns a column of values into a folder of individual barcode files or one print-ready PDF sheet. Developers can skip the UI entirely and call the REST API directly, e.g. /barcode?type=code128&data=YOURDATA, to generate barcodes on demand from any backend.

Printing and Scanning Best Practices

Code 128's density is a strength but also means print quality matters more than with simpler barcodes. A few practical rules:

Common uses

Frequently asked questions

What's the difference between Code 128 and Code 128 A/B/C?

Plain Code 128 auto-selects the best character subset (A, B, or C) for your data to keep the barcode as short as possible. Code 128 A, B, and C lock the encoder into one specific subset — useful when a downstream system expects a fixed character set rather than an auto-switching one.

Is a code 128 barcode generator free to use?
Yes — Barcode Mint's Code 128 barcode generator runs entirely in your browser at no cost, with no account required for standard PNG/SVG/PDF exports.
How much data can a Code 128 barcode hold?

There's no hard character limit in the standard, but practically most implementations stay under 80 characters to keep the barcode a reasonable physical width. Longer strings work but produce a wider, harder-to-scan symbol.

Does Code 128 include a check digit?
Yes, every Code 128 symbol includes a mandatory checksum character calculated automatically by the encoder — you never need to add it to your input data yourself.
Can I generate Code 128 barcodes in bulk from a spreadsheet?

Yes. Upload a CSV of values to Barcode Mint's bulk tool and it will output a ZIP of individual barcode images or a single print-ready PDF sheet, one barcode per row.

Can I call Code 128 generation from my own application?
Yes — Barcode Mint's REST API accepts requests like /barcode?type=code128&data=YOURDATA and returns the barcode image directly, so you can generate labels programmatically from any backend or script.

Related barcode types

Browse all 106 barcode & QR types →