GS1 data syntax guide

GS1 Application Identifiers: a practical guide

Understand the numeric prefixes that give barcode data its meaning—from GTIN (01) to lot (10), expiry (17) and serial (21).

Technical guide Updated September 18, 2026 10 min read

A practical guide to GS1 Application Identifiers: common AIs for GTIN, lot, expiry, serial and logistics; fixed versus variable length; FNC1 separators; and Digital Link placement.

How Application Identifiers make data unambiguous

A barcode can carry several values in one scan. Without a shared dictionary, the receiving system would not know whether 271231 is a date, quantity or internal code. AIs give each field a defined data title, character set and length.

(01)GTIN AI09520123456788product identifier(17)expiry AI2712312027-12-31(10)lot AIABC123lot value

The parenthesized form is called human-readable AI notation. In encoded GS1 element strings, parentheses are omitted. The barcode symbology and separators tell a conforming decoder how to read the fields.

Common GS1 Application Identifiers

AIMeaningData formatTypical role
(00)SSCC18 numericLogistic unit identifier
(01)GTIN14 numericTrade item identifier
(10)Batch or lotUp to 20 charactersTraceability
(11)Production date6 numeric, YYMMDDDate attribute
(15)Best-before date6 numeric, YYMMDDDate attribute
(17)Expiration date6 numeric, YYMMDDDate attribute
(21)Serial numberUp to 20 charactersItem-level identity
(30)Variable countUp to 8 numericQuantity
(37)Count of trade itemsUp to 8 numericLogistic quantity
(414)Physical location GLN13 numericLocation identifier

This is a practical subset, not the complete dictionary. GS1 defines more than 100 AIs covering identifiers, dates, dimensions, amounts, locations, logistics and sector-specific data. Use the current GS1 General Specifications or GS1 Barcode Syntax Resource rather than inventing prefixes.

Fixed length, variable length and FNC1

Fixed-length field

AI (01) + exactly 14 digits
0109520123456788

The decoder knows exactly where GTIN ends, so no field separator is needed after it.

Variable-length field

AI (10) + lot + separator + AI (21)
10ABC123<GS>2112345

If a variable field is not last and uses fewer than its maximum characters, an FNC1 separator—seen in scan data as ASCII Group Separator—marks its end.

Ordering fixed-length data before variable-length data can reduce separator needs, but AI combinations and ordering are governed by GS1 rules. Never assume parentheses are separators: they are not encoded in the element string.

Practical rules for using AIs

  • Use AI (01) with a 14-digit GTIN, including any required leading filler zeroes.
  • Keep each value within its permitted character set and length.
  • Encode dates as YYMMDD and validate that the date is meaningful for the business process.
  • Terminate variable-length data when another element follows and a separator is required.
  • Check mandatory associations and invalid combinations—not every individually valid AI can appear with every other AI.
  • Use the Barcody GS1 AI parser to inspect an element string, then confirm production data against official GS1 rules.

Authoritative references