General purpose

Code 128

Code 128 encodes any ASCII text or number at high density. Subsets A, B and C are selected automatically for the shortest symbol.

Preview

Enter valid data to see the barcode.

Encoding happens entirely in your browser. This tool encodes numbers you already own — it does not issue or register GS1 company prefixes.

Data rules

Any printable ASCII, 1–80 characters

  • Length: 1–80 characters
  • Character set: alphanumeric
  • Check digit: not used
  • Quiet zone: 10 modules

Printing notes

  • Code 128 carries a mandatory modulo-103 symbol check character, computed automatically inside the symbol.
  • Numeric-only data is encoded in subset C at two digits per symbol character, roughly halving the width.
  • For GS1 Application Identifier data use GS1-128 instead, which adds the FNC1 start pattern.

Workflow links

Related barcode formats

What is Code 128?

Code 128 is the workhorse of internal business barcoding. It encodes the full 128-character ASCII set at high density, with three character subsets (A, B and C) that the encoder switches between automatically — subset C packs two digits into one symbol character, which is why numeric data is so compact.

It carries a mandatory modulo-103 checksum computed from the encoded characters, so a partial read is rejected rather than silently misread.

Frequently asked questions

Is this Code 128 generator free to use?

Yes. The Code 128 generator is free, has no signup and adds no watermark. The symbol is encoded in your browser, so the data you type is never uploaded to a server.

What file format should I download for printing Code 128?

Download SVG for anything that will be printed. SVG is vector, so bar widths and the quiet zone stay exact at any size. PNG is fine for screens and slide decks, but never scale a PNG barcode up — enlarging it blurs the bar edges and scanners start failing.

Code 128 or Code 39 — which should I use?

Code 128 for almost everything: it is denser, supports lowercase and full ASCII, and has a stronger checksum. Code 39 is only preferable when an old scanner or legacy system explicitly requires it.

Is Code 128 the same as GS1-128?

GS1-128 is Code 128 with GS1 rules applied: a leading FNC1 and data structured as Application Identifiers such as (01) GTIN or (17) expiry. The symbology is the same; the data format is not.

Standards & references

This page follows the published specifications. The bodies that own them: