Code 128 Barcode Generator

Create Code 128 barcodes from any text, numbers or symbols. They are the most widely used barcodes for shipping, inventory and labels. The best subset (A, B or C) is picked automatically, so your barcode is as compact as possible.

  • 100% free
  • No sign-up
  • No watermark
  • Works offline in your browser

Any ASCII text: letters, numbers, spaces and symbols. Long runs of digits are packed in pairs automatically.

Customize size, color & style
Make many

How to create a Code 128 barcode

  1. Enter your data in the box above. Any ASCII text: letters, numbers, spaces and symbols. Long runs of digits are packed in pairs automatically.
  2. The barcode updates live as you type. Open Customize to change the bar height, colors, rotation or quiet zone.
  3. Click Download PNG for labels and documents, or SVG / PDF for print and packaging design.
  4. Test it with our online barcode scanner before you print a large run.

What is a Code 128 barcode?

Code 128 is a high-density linear barcode that can encode all 128 ASCII characters, including upper and lower case letters, digits and punctuation. It is the default choice for shipping labels, warehouse and inventory tags, and anything that needs letters as well as numbers.

It has three character sets. Code 128 A covers capitals and control characters, B covers upper and lower case, and C packs two digits into each symbol. A good encoder switches between them to keep the barcode short. Every Code 128 barcode ends with a mandatory modulo 103 check character.

Where Code 128 is used

  • Shipping and courier labels (UPS, FedEx, DHL)
  • Warehouse, bin and inventory labels
  • Asset tags and library or ID cards
  • Amazon FNSKU labels
  • Healthcare specimen and patient labels

Code 128 specifications

TypeLinear (1D), variable length
CharactersFull ASCII 0–127 (A, B, C subsets)
LengthVariable. Keep under about 20–25 characters for easy scanning
Check digitMandatory modulo 103 (added automatically, not shown)
DensityHigh. Numeric data packs two digits per symbol
StandardISO/IEC 15417

Tips for a barcode that scans first time

  • Shorter data gives a wider, easier-to-scan barcode at the same printed size.
  • All-numeric data with an even number of digits is the most compact, because it uses subset C.
  • Leave a quiet zone of at least 10× the narrowest bar on each side.
  • For GS1 logistics data (GTIN, batch, expiry) use GS1-128 instead of plain Code 128.

Frequently asked questions

What can a Code 128 barcode contain?

Any of the 128 ASCII characters: A–Z, a–z, 0–9, spaces and punctuation such as - . / + %. It cannot encode accented letters or emoji. Use a QR code or Data Matrix for those.

Is Code 128 the same as GS1-128?

GS1-128 is a special use of Code 128. It starts with a FNC1 character and carries GS1 Application Identifiers like (01) GTIN or (17) expiry date. Every GS1-128 is a Code 128, but not the other way round.

Do I need to add a check digit?

No. The modulo 103 check character is calculated and added automatically. It is part of the bars but is not printed in the human-readable text.

Code 128 vs Code 39: which should I use?

Use Code 128 unless an old system specifically needs Code 39. Code 128 holds more characters, including lower case, and produces a much shorter barcode for the same data.

How long can a Code 128 barcode be?

The spec has no hard limit, but most scanners struggle with barcodes wider than about 15 cm. Up to about 25 characters of text, or 40+ digits, is practical.

Can I make lots of Code 128 barcodes at once?

Yes. Use the free bulk barcode generator to paste a list or upload a CSV and download them all as a ZIP or a printable PDF label sheet.

Related free tools