GS1 Digital Link URI syntax, with examples

2026-05-25 · Updated 2026-08-05 · Onpack

A GS1 Digital Link URI is ordinary URL syntax carrying GS1 identifiers in a defined grammar. Reading and writing it takes ten minutes to learn, and the payoff is that the same string is meaningful to a browser, a checkout scanner, and any conformant piece of supply-chain software. The normative grammar is the GS1 Digital Link URI syntax standard; this is the working summary.

The shape

https://domain/01/GTIN/10/BATCH/21/SERIAL?17=YYMMDD

Each numeric path segment is a GS1 Application Identifier followed by its value. The primary key comes first, qualifiers follow in fixed order, and data attributes that are not identity travel as query parameters.

The segments you will actually use

AINameExampleNotes
01GTIN/01/0950600013435214 digits in the URI, left-padded from shorter GTIN forms
10Batch or lot/10/LOT42Case-sensitive, up to 20 characters, enables per-lot behaviour
21Serial/21/SER0001Item-level identity, the basis of authenticity checks
17Expiry?17=270630YYMMDD; day 00 means end of month per GS1 rules

Depth buys behaviour

Each added segment unlocks a class of resolver behaviour. GTIN alone gives product-level answers: the page, the passport, the default links. Adding the batch lets the resolver serve per-lot recalls and origin data. Adding the serial enables per-item authenticity, including signed serials that a resolver verifies at scan time. The expiry attribute lets any scanner, human or machine, learn the item is past date without a database lookup.

Compressed and alphanumeric forms

The standard also defines a compressed binary form of the URI (used when space is extreme, and by RFID infrastructure via EPC encodings) and an alphanumeric spelling (/gtin/ instead of /01/). Conformant resolvers, Onpack included, accept these variants and treat them as the same identity; the API reference lists the accepted spellings.

Practical authoring rules

Always encode the GTIN at 14 digits in the URI. Keep batch and serial values in the character set your printers and systems agree on, and treat them as case-sensitive. Keep the total string short, because URI length drives printed symbol size. And never hand-assemble in production: the generator and API emit correct URIs with validated check digits, which is one less place for a recall-critical typo to live.

Common questions

What does the 01 in a Digital Link URL mean?

It is GS1 Application Identifier 01, the GTIN. Digital Link writes AIs as path segments: /01/ for GTIN, /10/ for batch, /21/ for serial, /17/ for expiry.

Does segment order matter?

Yes. The standard requires the primary key first (the GTIN), followed by qualifiers in defined order: batch, then serial. Query parameters carry other data attributes.

Are uppercase and lowercase significant?

The AI numbers are digits, and the domain is case-insensitive, but batch and serial values are case-sensitive identifiers, so print exactly what your systems store.

Can any domain host Digital Link URIs?

Yes, the syntax works on any hostname. What matters is that a conformant resolver answers there. Shorter domains also produce physically smaller QR codes.

Print a code that stays alive

Generate a conformant GS1 Digital Link for any GTIN, check it fits your label, and host the page behind it. Free at any volume.

Create a code