GS1 Application Identifiers (AI) Explained
A GS1 Application Identifier (AI) is a numeric prefix that defines the meaning and length of the data that follows it inside a GS1 barcode, such as a GTIN, batch, expiry date, or serial number.
Updated 2026-09-30 · 6 min read
What an Application Identifier is
A GS1 Application Identifier is a two- to four-digit prefix at the start of a data element. It tells the scanner what the following characters mean and whether the field is fixed or variable length.
A barcode is therefore a sequence of AI-plus-value pairs, not a single opaque number. Reading it means splitting on the AI boundaries, which change with the symbology.
Common identifiers
The identifiers below cover most logistics and healthcare labels. Fixed-length fields are followed directly by the next AI; variable-length fields must be terminated.
| AI | Meaning | Length |
|---|---|---|
| 00 | SSCC — serial shipping container code | 18 digits, fixed |
| 01 | GTIN — global trade item number | 14 digits, fixed |
| 02 | GTIN of contained trade items | 14 digits, fixed |
| 10 | Batch or lot number | Up to 20, variable |
| 17 | Expiration date (YYMMDD) | 6 digits, fixed |
| 21 | Serial number | Up to 20, variable |
| 30 | Variable count | Up to 8, variable |
| 37 | Count of contained trade items | Up to 8, variable |
| 8005 | Price per unit of measure | 6 digits, fixed |
GS1-128, DataMatrix, and QR
The same AI data can travel in different symbologies. GS1-128 is a linear barcode that uses FNC1 to mark the end of a variable-length field. GS1 DataMatrix is a 2D symbol that uses the same AI rules.
In raw scanner output, the FNC1 separator appears as ASCII 29 (GS). A parser must either honour that separator or use the AI length table to split the string, otherwise batch and serial fields run together.
GS1 Digital Link
GS1 Digital Link expresses the same identifiers as a web URI, so a scan can resolve to a product page. The data is equivalent; the encoding is a URL instead of a barcode.
Because the identifiers are the same, a decoder can accept either a raw element string or a Digital Link URI and return one structured result.
Try it on real data
Frequently Asked Questions
AI 01 is the GTIN of the trade item itself. AI 02 is the GTIN of items contained inside the logistic unit and is normally used with AI 37 to give the count.
FNC1 is a non-data character in GS1-128 that marks the end of a variable-length field. In raw scanner output it usually appears as ASCII 29, the group separator.
Fixed-length identifiers define their own length, so the next AI starts immediately after. Variable-length identifiers must be terminated by FNC1 or by the end of the data.