Barcode 128 (Code 128): What It Is and How to Make One

Published 9 October 2026

Barcode 128, usually written Code 128, is the barcode behind most shipping labels, inventory tags and warehouse locations. Here's what it is, how it works, and how to make one that scans.

SetBest for
ACapital letters, digits, control characters
BUpper and lower case letters, digits, symbols
CLong runs of digits (two per symbol)

What is barcode 128?

Barcode 128 is a one-dimensional barcode that can encode the whole ASCII character set: upper and lower-case letters, digits, spaces and symbols. That flexibility, together with a very compact design, is why it became the everyday choice for labelling things inside a business. Use the Code 128 generator to make one right away.

The three character sets

Code 128 has three internal sets, and a good encoder switches between them automatically to keep the barcode short.

  • Set A covers capital letters, digits and control characters.
  • Set B covers capital and lower-case letters, digits and symbols.
  • Set C packs digits in pairs, so a long number takes about half the room.

You don't pick the set yourself. The barcode simply starts with a start character that says which set comes first.

The check character

Every Code 128 barcode includes a check character. It's calculated from the start character and the data (each value multiplied by its position, added up, and divided by 103, keeping the remainder). A scanner repeats the calculation, and if the result doesn't match, it rejects the scan. You never type it. The generator adds it for you, and it isn't shown under the bars.

Where barcode 128 is used

  • Shipping and parcel labels, including GS1-128, which is built on Code 128
  • Warehouse shelves, bins and pallets
  • Inventory and asset tags
  • Reference numbers on documents, samples and returns slips

What it's not for

It isn't the barcode shops expect on products. Retail checkouts want an EAN-13 or UPC-A. See retail barcodes explained for the difference.

How to make a Code 128 barcode

  1. Open the Code 128 barcode generator.
  2. Type your text or number. Up to 80 characters is accepted here.
  3. Pick a bar width and height, and turn on "Show the value" if you want the text under the bars.
  4. Download the SVG or PNG, or print it.

Longer values make wider barcodes. If yours is too wide for the label, shorten the text or reduce the bar width.

Code 128 or Code 39?

For new projects, Code 128 is usually the better choice, because it's more compact and holds more characters. Code 39 makes sense mostly where an existing system asks for it. We compare them in Code 128 vs Code 39.

Printing tips

Print at 100% scale, keep a clear margin on both sides, and test one label before you print a roll. Our guide to printing barcode labels that scan covers all of it.

Does barcode 128 work with a phone?

Many phone barcode scanning apps read Code 128, and some camera apps do too. If a phone can't read it, try a dedicated barcode scanner app. For warehouse use, handheld scanners read it without trouble.

Which characters can I use?

Letters, digits, spaces and common symbols. The generator on this site accepts printable ASCII characters (codes 32 to 126). If you paste something it can't encode, such as an emoji, it tells you rather than creating a barcode that wouldn't scan.

Frequently asked questions

What is barcode 128?

Barcode 128 is another name for Code 128, a compact barcode that can hold letters, numbers and symbols.

How many characters can Code 128 hold?

The format has no fixed limit, but longer values make a wider barcode. This generator accepts up to 80 characters.

Is Code 128 case sensitive?

Yes. A scanner returns exactly what was encoded, so abc and ABC are different.

Do I need a check digit for Code 128?

No. A check character is built in and added automatically.

Can Code 128 be used for products in shops?

Not at the till. Shops use EAN-13 or UPC-A for products. Code 128 is for stock, shipping and internal labels.

More guides

See all guides