Back to articles

Published · October 18, 2026

Code 128 and GS1-128: The Barcode Behind Every Shipping Label

The long barcode on a carton or pallet label is usually Code 128, and often its GS1-128 variant. Here is how it encodes data, what the numbers in brackets mean, and how an SSCC works.

What it is

A Code 128 barcode is a high-density linear barcode defined in ISO/IEC 15417:2007, developed by Computer Identics in 1981. GS1-128 is a subset of it, and it is the one you'll see on cartons and pallets: the long row of bars on a shipping label that a warehouse scanner reads in a split second.

How a Code 128 barcode works

Three code sets

Code 128 can encode all 128 ASCII characters, yet it has only 108 symbols. The trick is switching between three code sets. Set A covers ASCII 00 to 95, including control codes. Set B covers ASCII 32 to 127, so it includes lowercase letters. Set C packs two digits into a single symbol, so long numbers get much shorter. According to Wikipedia's Code 128 entry, switching into set C pays off for four or more digits at the start or end of the data, or six or more in the middle.

Each symbol is three bars and three spaces, 11 modules wide in total. There are 103 data symbols, 3 start symbols and 2 stop symbols.

Start, check, stop, quiet zone

A complete barcode runs in this order: quiet zone, start symbol, data, check symbol, stop symbol, final bar, quiet zone. The check symbol is mandatory. It's a weighted modulo-103 checksum, and the generating software calculates it for you. The stop pattern is 13 modules wide with four bars, which lets a scanner tell which way it is reading, so the label works at any angle of approach. Each quiet zone has to be at least 10 times the width of one module, so leave that margin clear when you print.

What makes GS1-128 different

GS1-128, formerly called UCC/EAN-128, is marked by a leading FNC1 character after the start symbol. That one character tells a scanner the data is structured. Plain Code 128 holds any text. GS1-128 holds Application Identifiers, or AIs, which are two- to four-digit prefixes that say what the next value means.

Common ones:

  • (00) SSCC: 18 digits that identify one pallet, case or parcel
  • (01) GTIN: 14 digits for the product
  • (10) batch or lot, up to 20 characters
  • (17) expiry date as YYMMDD
  • (21) serial number, up to 20 characters
  • (37) count of items in the unit

The brackets are only for people. They show up in the human-readable text under the bars but are not encoded, so (01)00614141999996(10)LOT42 is stored as 0100614141999996 followed by 10LOT42. Fixed-length AIs like (00) and (01) need no separator. Variable-length ones, like a lot number, need an FNC1 after them if more data follows, so the usual practice is to put fixed-length fields first and one variable-length field last. If you want the bigger picture on retail codes, see what barcode numbers mean.

Where you'll see it

GS1-128 labels go on individual cartons and on pallets. They usually pair with an Advance Shipment Notice (ASN): the shipper sends the ASN electronically, and the receiver scans the label at the dock to pull up exactly what is inside without opening the box. Retailers often require them, and each has its own label rules, so a mismatch can lead to chargebacks.

Not every shipping label uses it, though. Parcel carriers add their own 2D codes, such as MaxiCode on UPS labels, and your phone reads a different set of formats again; see the barcode formats a phone can read.

Tips, gotchas, and a quick how-to with QRDock

  • Use a generator that supports GS1-128 with FNC1, not a plain Code 128 one, if a trading partner asks for GS1-128.
  • Keep the quiet zones clear and scan-test a printed label before it ships.
  • Check the AI order your partner expects. A label can scan fine and still be rejected for the wrong fields.

Curious what a label actually says? Scan it with QRDock and read the raw text it decodes. We can't promise it will break the string into AI fields for you, but you can compare it against the printed text. QRDock is free, doesn't track you and doesn't show ads: App Store or Google Play.

Frequently Asked Questions

Is Code 128 the same as GS1-128?

No. GS1-128 is a subset of Code 128 that starts with an FNC1 character and carries Application Identifiers. A plain Code 128 barcode has no such structure.

Does Code 128 have a check digit?

Yes. Every Code 128 barcode includes a mandatory weighted modulo-103 check symbol before the stop symbol, calculated by the generating software.

Can Code 128 hold letters?

Yes. Code sets A and B cover ASCII characters, including uppercase and lowercase letters, while set C packs digit pairs.

What is an SSCC?

The Serial Shipping Container Code is an 18-digit number, under Application Identifier (00), that identifies one pallet, case or parcel.