Skip to content
UPC Maker

Code 128 Barcode Generator

Code 128 is the barcode to use for your own numbers: SKUs, bin locations, order numbers and asset tags. Type anything on a standard keyboard and download a compact barcode that every modern scanner reads.

Your barcode appears here.

Free, no sign-up, no watermark. Barcodes are drawn in your browser and nothing you type is uploaded.

What Code 128 is for

Code 128 is the general-purpose barcode. It is not tied to any registry, so the content is yours to decide. That makes it the right choice any time the barcode only has to work inside your own business or between you and a partner who has agreed the format.

  • SKU labels on products, shelves and bins.
  • Order and shipment numbers on pick lists and packing slips.
  • Asset tags on equipment, tools and returnable containers.
  • Amazon FNSKU labels, which are Code 128 under the hood. There is a ready-made FNSKU label generator for those.
  • Carrier tracking barcodes, most of which are Code 128 or its GS1 variant.
Code 128 barcode encoding the text SKU-48213-BLK
Thirteen characters, including letters and hyphens, in one compact barcode.

How Code 128 keeps barcodes short

Code 128 has three character sets and switches between them inside one barcode. Set A covers capitals and control characters. Set B covers capitals, lowercase and punctuation. Set C encodes digits in pairs, so two digits take the space of one letter.

This tool chooses the sets for you to produce the shortest barcode. You can use that knowledge when you design your codes:

  • A run of four or more digits is cheap. 482130 takes three symbols, not six.
  • An odd number of digits wastes one. 0482130 is no wider than 482130 plus a single character.
  • Mixing letters and digits one at a time, like A1B2C3, is the most expensive pattern.

How wide will it be?

Every character adds 11 narrow-bar widths, and the start, check and stop characters add 35 more. At a comfortable print density that works out to roughly:

ContentApproximate widthFits on
8 letters or 16 digits1.4 in (36 mm)A 2 x 1 in label
12 letters or 24 digits1.9 in (48 mm)A 2.25 x 1.25 in label
20 letters2.75 in (70 mm)A 4 x 2 in label

These figures include the blank margin at each end and assume a narrow bar of 0.010 inches (10 mil), which every common scanner reads easily. If your code will not fit, shorten the code before you shrink the barcode. The SKU generator builds short, consistent codes from product names.

Code 128 for a whole catalogue

Paste your SKU column into the bulk barcode generator to print every label on standard sheets. If a trading partner has asked for lot numbers or expiry dates in the barcode, they almost certainly mean GS1-128, which is Code 128 with a fixed structure for that data.

Frequently asked questions

Can Code 128 hold letters and numbers?

Yes. It encodes all 128 ASCII characters, which covers capital and lowercase letters, digits and punctuation. That is the main reason it replaced Code 39 for most uses.

How long can a Code 128 barcode be?

There is no fixed limit in the standard, but width grows with every character. Around 20 characters is comfortable on a 2 inch label. Past 30 or so, most handheld scanners cannot fit the whole barcode in view.

Why is my all-digit barcode shorter?

Code 128 has a numeric mode that packs two digits into one symbol. A number with an even count of digits uses it for the whole barcode, so 12 digits takes about the same space as 6 letters.

Is Code 128 the same as GS1-128?

GS1-128 is Code 128 with an extra marker at the start and a fixed vocabulary for the content, such as (01) for a GTIN and (10) for a lot number. Use plain Code 128 for your own data and GS1-128 when a trading partner asks for it.