Skip to content

Code 128 Barcode Generator for Labels and Inventory

The most versatile linear barcode. Encode SKUs, serial numbers and tracking IDs with letters, digits and punctuation, then download sharp label artwork.

  • 100% free
  • No sign-up
  • Never expires
  • No watermark
Loading generator…

How to use the Code 128 generator

  1. 1

    Enter your value

    Type a SKU, asset tag, order number or tracking ID. Letters, digits, spaces and symbols are all allowed.

  2. 2

    Size it for your label

    Lower the bar width to fit narrow labels, and raise the height for hand-held scanning. Keep the human-readable text on if people need to read it.

  3. 3

    Print or download

    Print directly or export SVG or PDF for label design software. Use the Bulk Studio when you have hundreds of codes.

Features

  • Full ASCII support: upper and lower case, digits, punctuation
  • Automatic code set switching for the shortest possible barcode
  • Adjustable bar width, height, font size and margins
  • SVG, PNG and PDF export, plus direct printing to label printers
  • Bulk mode turns a spreadsheet of SKUs into a ZIP of barcodes

Why Code 128 is the default choice

Code 128 can encode all 128 ASCII characters and is much denser than older formats like Code 39. That means a shorter barcode for the same data, which matters on small labels. It also includes a mandatory checksum, so a damaged or misread barcode is rejected instead of returning the wrong value.

It is the basis of GS1-128, the format used on logistics labels for batch numbers, expiry dates and serial shipping container codes. Almost every scanner made in the last 25 years reads it without configuration.

Code 128 and Code 39 symbols encoding the same text, with Code 128 about half the width
Code 128 packs the same string into roughly half the label space.

Code sets A, B and C

Code 128 has three character sets, and the encoder can switch between them in the middle of a barcode. You do not need to choose one; the generator picks the most compact combination automatically.

Code setCharactersBest for
AUpper case, digits, control charactersLegacy systems that use control codes
BUpper and lower case, digits, punctuationMost text such as SKUs and names
CDigit pairs 00-99Long numbers; packs two digits per symbol

Tips for reliable Code 128 labels

  • Long numeric values are shorter in Code 128 than in any other common 1D format, thanks to code set C.
  • Keep a quiet zone of at least 10 times the narrowest bar on each side.
  • For thermal printers, use a bar width that is a whole number of printer dots to avoid uneven bars.
  • If a value is too long for your label, consider a Data Matrix or QR code instead.

Frequently Asked Questions

Is Code 128 the same as GS1-128?

GS1-128 is Code 128 with a special FNC1 start character and data organised into GS1 application identifiers, such as (01) for GTIN or (17) for expiry date. Plain Code 128, which this tool creates, is the right choice for internal labels.

How long can a Code 128 barcode be?

The specification has no hard limit, but practical scanners struggle beyond about 40 to 50 characters, and the barcode becomes very wide. For long data, use a 2D code.

Can Code 128 encode lower-case letters?

Yes. Code set B covers upper and lower case letters, digits and common punctuation, unlike Code 39, which is upper case only.

Can I use Code 128 on retail products?

Not at the checkout. Point-of-sale systems expect EAN-13 or UPC-A. Use Code 128 for internal stock, shipping and asset labels.