Home › Blog › Encoding Lot Numbers, Expiry Dates & SSCC
Encoding Lot Numbers, Expiry Dates & SSCC on a Barcode: Code 128 vs. GS1-128
A single barcode often needs to say more than "here's a product number." Batch numbers, expiry dates, and container IDs all want a place on the label too. Here's how far plain Code 128 gets you, where the GS1-128 standard picks up, and a practical way to handle it in the meantime.
Short answer: a shipping or product label frequently needs to carry more than a single identifier — a lot number for traceability, an expiry or production date, and sometimes a container-level code like an SSCC — but a barcode is just one string of characters.
Picture a hypothetical food distributor packing pallets for shipment. Each pallet needs a container ID so a receiving dock can log it in one scan, but the boxes on that pallet also carry a batch number (for a recall trace, if one is ever needed) and a best-by date. Printing three separate barcodes for three separate facts works, but it clutters the label and triples the scans needed at the dock. The alternative is packing more than one fact into a single barcode — which raises the question of how a scanner is supposed to know where one field ends and the next begins.
What plain Code 128 can and can't tell a scanner
Short answer: Code 128 will happily encode any string you build yourself — letters, digits, and symbols, with no fixed length — but it has no built-in concept of "this part is the lot number" and "this part is the date." Your own system has to know the layout in advance.
Say the same hypothetical distributor decides to concatenate the fields into one value, like LOT4471-EXP20270601, and encode that as Code 128. The barcode itself will render and scan correctly — Code 128 doesn't care whether the string is a serial number, a sentence, or a mash-up of three fields. The catch is on the reading end: unless the warehouse management software has a rule hard-coded for exactly that layout (split on the dash, treat the first chunk as a lot code, parse the rest as YYYYMMDD), the scan just comes back as one opaque string. That's workable inside a single company's closed loop, but it breaks the moment a different company's scanner or software needs to read the same label without a custom integration.
Worth noting: this tool's Code 128 mode (including the bulk and sequential features) generates exactly this kind of custom-format string well — it's the standardized, cross-company parsing layer that a plain Code 128 barcode doesn't provide on its own.
GS1-128 and Application Identifiers, in plain terms
Short answer: GS1-128 is Code 128 combined with a standardized numeric prefix system called Application Identifiers (AIs), so any GS1-compliant scanner anywhere can automatically tell a GTIN from a lot number from an expiry date within the same barcode.
Under the GS1-128 standard, each data field gets a short bracketed numeric prefix before it: (01) means "the next digits are a GTIN," (10) means "the next characters are a batch/lot number," (17) means "the next 6 digits are an expiry date in YYMMDD," and (00) flags an SSCC (Serial Shipping Container Code), the 18-digit identifier used for a single pallet or container as it moves through a supply chain. Reusing the earlier example, a GS1-128 version might look like (01)00614141123452(10)LOT4471(17)270601 — same information, but now self-describing: a compliant scanner parses out the GTIN, lot, and expiry date without anyone having to agree on a custom layout beforehand.
That standardization is the entire point of GS1-128: it trades a bit of extra length in the barcode for universal, unambiguous parsing across companies, carriers, and retailers. It's why it's the norm on shipping labels that move between different organizations' systems, rather than staying inside one warehouse.
Plain Code 128 vs. GS1-128 at a glance
Aspect
Plain Code 128 (available in this tool)
GS1-128 (Application Identifiers)
Data structure
Any string you define yourself
Standardized AI prefixes (e.g. (01), (10), (17))
Cross-company parsing
Requires a shared custom agreement
Automatic, per GS1 standard
Typical fit
Internal serial numbers, single-system tracking
Multi-party supply chain, retail logistics
SSCC (container ID)
Can hold 18 digits, but untagged
Tagged with AI (00), universally recognized
A practical workaround you can use right now
Short answer: keep the barcode itself short — just the core identifier — and put the lot number, expiry date, or other detail in a printed caption underneath, so a human reading the label sees the full picture even without a GS1-128-aware scanner.
Until a workflow specifically needs full GS1-128 parsing, a simpler split often works fine: encode only the serial number or product code as the barcode value, and use a separate caption line on the printed label for everything else. In this tool's bulk mode, the "value + caption" option is built for exactly that pattern — the barcode encodes the value (say, a carton's serial number) while the caption underneath carries free-text context like a lot number or a shelf location, printed on the label sheet without being part of the scanned data itself. It's a reasonable middle ground for teams that aren't yet plugged into a full GS1 workflow but still want the traceability detail visible on the label.
Full Application Identifier-aware GS1-128 generation — where the tool itself builds the (01)…(10)…(17)… structure for you — is a mode this generator doesn't currently offer; it's one we're evaluating for a future update.
Try Code 128 with a custom string, or use the bulk value + caption mode for lot-level detail:
Can a barcode hold more than one piece of information, like a lot number and an expiry date?
Yes, in principle. A general-purpose format like Code 128 can encode any combination of letters, numbers, and symbols in one string, so you can concatenate a product code, lot number, and date into a single value (for example LOT4471-EXP20270601). The scanner reads it as one text string, and your own system is responsible for splitting it back into fields.
What is GS1-128 and how is it different from plain Code 128?
GS1-128 is not a separate symbology — it's Code 128 used with a standardized data structure called Application Identifiers (AIs). Each AI is a short numeric prefix in parentheses, like (01) for a GTIN, (10) for a batch/lot number, or (17) for an expiry date, that tells scanning software exactly what the following digits mean. Plain Code 128 just encodes a raw string with no built-in meaning; GS1-128 adds a standardized vocabulary on top so any GS1-compliant scanner in the world can parse the fields automatically.
What is an SSCC and which format encodes it?
An SSCC (Serial Shipping Container Code) is an 18-digit number that uniquely identifies a single logistics unit, such as a pallet or shipping container, as it moves through a supply chain. It's carried using GS1-128 with Application Identifier (00) in front of it. A generic Code 128 barcode can technically hold 18 digits, but without the AI structure a receiving warehouse's automated system won't know to interpret it as an SSCC specifically.
Do I need GS1-128 for internal warehouse tracking, or is plain Code 128 enough?
For a closed system — your own warehouse, your own scanners, your own software — plain Code 128 with a consistent internal format (like a prefix plus a date plus a sequence number) is usually enough, since you control both ends of the process. GS1-128 becomes valuable once multiple companies need to read the same barcode the same way, such as a supplier's pallet label being scanned by a retailer's or carrier's system without any custom integration.
Can I still print a lot number or expiry date on a label if the barcode format doesn't support Application Identifiers?
Yes. A practical workaround is to encode only the core identifier (a serial number or product code) in the barcode itself, and use a separate printed caption on the label for the lot number, expiry date, or other human-readable detail. This keeps the barcode short and reliable to scan while the extra context stays visible to anyone reading the label by eye.
A note on this guide: the pallet/distributor scenario above is a hypothetical illustration used to explain the data structure, not a record of a real shipment. This article is for general informational purposes and isn't GS1 registration or supply-chain compliance advice — consult GS1 directly for authoritative Application Identifier specifications before implementing GS1-128 in production.