QR Decode
Decode a QR

GS1-128 Application Identifiers: How to Read Dates, Lots, and Serial Numbers

Be the first to rate this page.

Read GS1-128 fields by their Application Identifier, preserve variable-field separators, and confirm the receiving system's data contract.

Processed locally

Your input stays in this browser.

Ready to verify

Review the result before saving or printing.

No expiry

Static codes keep working without a subscription.

GS1-128 Application Identifiers are prefixes that state what each following value means: AI (10) is a batch or lot, AI (17) is an expiry date in YYMMDD form, and AI (21) is a serial number. Parentheses make human-readable text clearer but are not normally encoded as payload characters.

The specific decision in element-string parsing

GS1-128 element-string interpretation belongs to element-string parsing. Evidence means fixed-length AIs, FNC1 separators, and the receiver's field map. The controlled value is a GS1 element string containing a GTIN, variable batch or serial value, and fixed-length date. a warehouse receiver, traceability analyst, or systems integrator needs a parser that reads each Application Identifier and separates variable-length values according to GS1 rules; a decorative scan is irrelevant. Code 128 versus GS1-128 decides whether FNC1 and GS1 syntax apply; this guide reads the individual fields once that decision has been made. The physical mark must therefore answer this one operational question, not a neighbouring question with similar-looking bars or modules.

Facts to establish before using GS1-128 element-string interpretation

In element-string parsing, put a GS1 element string containing a GTIN, variable batch or serial value, and fixed-length date first. Add fixed-length AIs, FNC1 separators, and the receiver's field map next. State a parser that reads each Application Identifier and separates variable-length values according to GS1 rules in the local procedure. The figures are 480 cases; GTIN AI (01) with 14 digits; expiry AI (17) with 6 YYMMDD digits; batch AI (10) up to 20 characters; serial AI (21) up to 20 characters. GS1 Application Identifiers at https://ref.gs1.org/ai/?lang=en defines the outside terminology. Use that wording in the data contract before artwork, reader settings, or an import map is touched. test a GS1-128 element string.

Common GS1-128 fields
AIMeaningLength or form
(01)GTIN14 numeric digits
(10)batch or lotvariable, up to 20 characters
(17)expiration date6 digits: YYMMDD
(21)serial numbervariable, up to 20 characters

Worked case: a food distributor receives 480 cases marked (01)09512345678903(17)270630(10)LOT-842(21)SN-00418

Here is the case: a food distributor receives 480 cases marked (01)09512345678903(17)270630(10)LOT-842(21)SN-00418. Its figures are 480 cases; GTIN AI (01) with 14 digits; expiry AI (17) with 6 YYMMDD digits; batch AI (10) up to 20 characters; serial AI (21) up to 20 characters. Match the source entry to a GS1 element string containing a GTIN, variable batch or serial value, and fixed-length date. Create the selected carrier. Observe a parser that reads each Application Identifier and separates variable-length values according to GS1 rules. A successful decode does not correct a wrong product row, a laboratory mismatch, a shipping mix-up, or an inaccessible response route. separate GS1-128 from ordinary Code 128.

How the relevant data is read

element-string parsing is read through fixed-length AIs, FNC1 separators, and the receiver's field map. That rule sends a GS1 element string containing a GTIN, variable batch or serial value, and fixed-length date toward a parser that reads each Application Identifier and separates variable-length values according to GS1 rules. a warehouse receiver, traceability analyst, or systems integrator should explain each character without a guessed prefix or a software preview. Separators, zero fill, guards, direction, and field width can each carry operational meaning. Treat those details as data rather than presentation. check supplied GTIN arithmetic.

Errors particular to element-string parsing

These element-string parsing mistakes matter: Treating parentheses as literal barcode data, reading a variable lot as if it had a fixed length, or treating 270630 as 30 June 2027 without checking the partner's date interpretation can misroute stock. In a food distributor receives 480 cases marked (01)09512345678903(17)270630(10)LOT-842(21)SN-00418, repair the source record before making another symbol. A fresh export does not repair old data. Compare the repaired value with a GS1 element string containing a GTIN, variable batch or serial value, and fixed-length date. Then repeat the step that should produce a parser that reads each Application Identifier and separates variable-length values according to GS1 rules. inspect a non-sensitive test symbol.

Where the method stops

Application Identifiers describe data and do not prove that a product is genuine, that a lot is cleared for use, or that every scanner forwards FNC1 separators unchanged. This limits element-string parsing. The nearby comparison is different: Code 128 versus GS1-128 decides whether FNC1 and GS1 syntax apply; this guide reads the individual fields once that decision has been made. A calculation has one role; an optical read has another; a web answer has another. Allocation, custody, clinical judgement, authenticity, and partner approval require their own accountable process.

Technical case notes for element-string parsing

In (01)09512345678903(17)270630(10)LOT-842(21)SN-00418, AI 01 consumes exactly 14 GTIN digits and AI 17 consumes exactly six YYMMDD digits. AI 10 and AI 21 are variable-length, so an encoded FNC1 separator is needed when another AI follows them; printed parentheses make the HRI readable but are not normally payload characters. Feed the scan into the receiver's parser and check four named fields, not one undifferentiated text value. A date display must also follow the trading partners' documented interpretation rather than an assumed century rule.

What the result requires next

After the element-string parsing result, use a GS1 element string containing a GTIN, variable batch or serial value, and fixed-length date to locate the affected record. Let 480 cases; GTIN AI (01) with 14 digits; expiry AI (17) with 6 YYMMDD digits; batch AI (10) up to 20 characters; serial AI (21) up to 20 characters define the check. Let fixed-length AIs, FNC1 separators, and the receiver's field map define the interpretation. a warehouse receiver, traceability analyst, or systems integrator should receive a parser that reads each Application Identifier and separates variable-length values according to GS1 rules. If that result fails, the next action comes from this case — a food distributor receives 480 cases marked (01)09512345678903(17)270630(10)LOT-842(21)SN-00418 — rather than from Code 128 versus GS1-128 decides whether FNC1 and GS1 syntax apply; this guide reads the individual fields once that decision has been made.. The correction must be documented against GS1 Application Identifiers, because a later operator needs the same factual basis instead of an informal description of a scan.

Parse the element string by field length before using the data

Read (01)09512345678903(17)270630(10)LOT-842(21)SN-00418 as four fields, not one long identifier. AI 01 consumes exactly 14 GTIN digits. AI 17 consumes exactly six digits in YYMMDD form, so 270630 is the data value for 30 June 2027 only under the partner's documented century and date policy. AI 10 is a batch or lot value of variable length, and AI 21 is a variable-length serial value; an encoded FNC1 separator is needed when a variable field is followed by another AI. Parentheses in the human-readable interpretation make the sequence legible but are not normally encoded payload characters. In a receiving test, send the decoded string to the actual parser and verify four named outputs: GTIN, expiry, lot and serial. A parser that stores the entire string in one notes field has not demonstrated traceability. Preserve the supplier's field map and separator handling with the label specification, because a scanner wedge may transmit separators differently from a camera application. The article's example is a training string, not an allocation or a release decision for stock.

Handle exceptions without rewriting the element string

When a lot cannot be parsed, retain the raw decoded value and identify the first AI at which the partner parser diverges. Check separator placement and the declared field length before asking a supplier to reprint. Hand-editing parentheses or truncating a variable field destroys the evidence needed to diagnose the interface. GS1 Application Identifiers is the named source for the current external rule or product behaviour.

Enter your values, review the result, then use it with confidence.

Rate this page

Be the first to rate this page.