ScanMosaic

Code 128 barcodes: labels, inventory and shipping explained

5 min read · Updated 7 November 2026

Code 128 is a linear barcode that can encode all 128 ASCII characters: upper and lower case letters, digits and symbols. It's compact and reliable, so it's the default for warehouse labels, asset tags, SKUs and parcel labels.

When to use Code 128

  • Inventory and SKUs inside your own business.
  • Asset tags for laptops, tools and equipment.
  • Shipping and parcel labels, where carriers often use it for tracking numbers.
  • Not for the till. Retail checkouts expect EAN-13 or UPC-A.

How it stays compact

Code 128 has three character sets. Set A covers upper case and control characters, set B upper and lower case, and set C packs two digits into each symbol, so long numbers take half the space. A good generator switches between sets automatically to keep the barcode as short as possible. Every Code 128 also has a built-in check character, added for you and not shown in the text.

GS1-128 for cartons and pallets

GS1-128 is Code 128 with GS1 rules: data is split into fields with application identifiers in brackets, such as (01) for the product number, (10) for the batch and (17) for the expiry date. Use the GS1-128 generator when a retailer or distributor asks for it.

Size and printing

  • Keep a blank quiet zone of at least 10 modules on both sides.
  • The narrowest bar should be at least about 0.25 mm for thermal label printers.
  • Taller bars scan more easily at an angle; 10 to 15 mm suits most labels.
  • Shorter content makes a shorter barcode. Digits-only content packs tightest.

Make one

Open the Code 128 generator, type the text or number, set the bar width and height for your printer, and download PNG or SVG. For a run of labels, the Pro plan's bulk barcodes make up to 500 at once from a list or a number sequence.

  1. Choose the content. A SKU, asset number or tracking reference.
  2. Type it into the Code 128 generator. Character sets and the check character are handled for you.
  3. Set bar width and height for your printer. At least 0.25 mm per bar, 10 mm or more tall.
  4. Print a test label and scan it. Check the decoded text matches exactly.

Frequently asked questions

Questions

Can Code 128 encode letters?

Yes. Upper and lower case letters, digits and symbols.

What is the difference between Code 128 and Code 39?

Code 128 is more compact and covers more characters. Code 39 is older and still required in some industries and by some ID systems.

Can I use Code 128 on retail products?

Not for checkout. Shops scan EAN-13 or UPC-A. Use Code 128 for your own labels and logistics.

Make your first code in under a minute

Free, private, and checked to scan before you download.