EDGE ENGINE SUB-2MS DETERMINISTIC V8 EXECUTION • ZERO DATA RETENTION • EXPLORE API SPECS →

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.

AIMeaningLength
00SSCC — serial shipping container code18 digits, fixed
01GTIN — global trade item number14 digits, fixed
02GTIN of contained trade items14 digits, fixed
10Batch or lot numberUp to 20, variable
17Expiration date (YYMMDD)6 digits, fixed
21Serial numberUp to 20, variable
30Variable countUp to 8, variable
37Count of contained trade itemsUp to 8, variable
8005Price per unit of measure6 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

GS1 Barcode & Digital Link Decoder (Sunrise 2027) API →

Instant free GS1 barcode decoder for 2D DataMatrix, GS1-128, QR Digital Link, and Application Identifiers

Open the tool

Frequently Asked Questions

What is the difference between AI 01 and AI 02?

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.

What is the FNC1 character?

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.

How do I know where one AI ends and the next begins?

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.

Primary sources