Code 128 Barcode Generator

Code 128 is the barcode most people reach for when they need letters, numbers and symbols in one small label. Type your text below, check the preview, then download or print it.

Barcode type

Letters, numbers and standard symbols. Up to 80 characters.

Your barcode will appear here.

Your barcode data is processed in your browser and is not uploaded to our server.

Size and appearance

The blank margin (quiet zone) is never smaller than 10 times the bar width, so the barcode stays scannable.

Code 128 at a glance

CharactersAll 128 ASCII characters (this generator accepts printable characters, ASCII 32–126)
LengthVariable. Longer text makes a wider barcode
Check characterBuilt in and added automatically
Typical useShipping labels, logistics, inventory and asset tags

What you can enter

  • Letters (upper and lower case), digits, spaces and common symbols
  • Up to 80 characters in this generator
  • Upper and lower case are different: abc and ABC give different barcodes
  • You do not type the check character; it is added for you

What is Code 128?

Code 128 stores your text as a pattern of bars and spaces of different widths. It can hold the whole ASCII character set and squeezes data in tightly, which is why it turned into the everyday format for warehouses, shipping and internal labels.

Behind the scenes it uses three character sets: one suited to capital letters and control characters, one to lower-case letters, and one to pairs of digits. A good encoder switches between them automatically, so a long run of numbers produces a much shorter barcode than the same digits would in many other formats.

Where Code 128 is used

  • Shipping and parcel labels, including GS1-128 labels, which are built on Code 128
  • Warehouse shelf locations, bins and pallet tags
  • Inventory and asset tags, like the sticker on a company laptop
  • Reference numbers on documents, lab samples and returns slips

When to choose Code 128

Go with Code 128 if you need more than digits, if you want a long number to take up less room, or if your scanner or software already expects it. For labelling your own stock, it's a safe default.

One thing it's not for: products sold in shops. Checkouts expect an EAN-13 or UPC-A there. And if all you have is digits and you're labelling cartons, have a look at ITF-14.

Advantages

  • Handles letters, digits and symbols in one format
  • Compact for numeric data
  • Built-in error detection

Limitations

  • Not accepted for retail product barcodes
  • Very long text makes a wide barcode that's awkward to print and scan

How to create a Code 128 barcode

  1. Enter your data in the box above, for example ABC-12345.
  2. Check the preview and read any message under the box. It explains how to fix invalid input.
  3. Adjust the bar width, height or margin under “Size and appearance” if you need to.
  4. Select Download PNG, Download SVG or Print. Files are named code-128-barcode.png and code-128-barcode.svg.

Prefer another format? Return to the barcode generator to choose a different type.

Code 128 questions

Is Code 128 case sensitive?

Yes. A scanner gives back exactly what was encoded, so “abc” and “ABC” make two different barcodes.

How many characters can I use?

There's no hard limit in the format, but every extra character makes the barcode wider. This generator stops at 80. If it won't fit your label, shorten the text or reduce the bar width.

Why does my numeric Code 128 barcode look shorter than the same number in Code 39?

Code 128 packs two digits into a single symbol, so a long number takes about half the room it would in Code 39.

Do I have to type a check digit?

No, you don't have to. Code 128 has its own check character and the generator adds it for you.