See GS1 Digital Link URI examples for GTIN, batch or lot, serial number and expiry date, with an annotated URL and explanations of path qualifiers and query attributes.
Start with the anatomy, not the punctuation
The colors are explanatory only. The QR Code contains one uninterrupted URI.
Read the URI as structured GS1 data. Each numeric key is an Application Identifier, so software knows that 01 means GTIN, 10 means batch or lot and 17 means expiration date. Percent-encoding is required when a value contains characters that are not safe in a URL path or query.
Six useful GS1 Digital Link examples
GTIN only
https://id.example.com/01/09520123456788The simplest product Digital Link: primary key AI (01) plus a 14-digit GTIN.
GTIN on a brand domain
https://id.brand.example/01/09520123456788A custom domain is valid. It can route the scan to a brand-managed product experience.
GTIN + batch or lot
https://id.example.com/01/09520123456788/10/ABC123AI (10) qualifies the product identity with a variable-length batch or lot value.
GTIN + serial number
https://id.example.com/01/09520123456788/21/12345AI (21) identifies an individual instance of the trade item.
GTIN + expiry date
https://id.example.com/01/09520123456788?17=271231AI (17) is a data attribute in YYMMDD form, so it appears in the query string.
GTIN + lot + serial + expiry
https://id.example.com/01/09520123456788/10/ABC123/21/12345?17=271231Key qualifiers stay in the path in GS1 order; expiry remains a query attribute.
Note: example.com and .example names are reserved for documentation. These patterns illustrate syntax; they are intentionally not live product destinations.
The placement rules behind the examples
| Role | Examples | URI location | Why |
|---|---|---|---|
| Primary identification key | GTIN (01) | Path | Identifies the main resource |
| Key qualifier | CPV (22), lot (10), serial (21) | Path, in that order | Narrows identity from product class toward variant, batch or instance |
| Data attribute | Expiry (17), weight (310n) | Query string | Describes the identified item without becoming part of its identity |
For example, a lot number helps identify a batch and therefore qualifies the GTIN. An expiry date describes that batch or item, but two otherwise identical items are not different identities merely because a date is present.
Canonical does not mean only valid form
GS1 defines a canonical Digital Link representation using HTTPS, id.gs1.org, numeric AIs, 14-digit GTIN and ordered GS1 query attributes. A valid implementation may use a brand domain and may include an allowed path prefix before the primary key. Canonical form is useful when systems need one predictable representation; it does not prohibit brand-controlled domains.
https://id.brand.example/products/01/09520123456788A URI can be syntactically valid while still being operationally useless—for example, if the domain expires, the route returns an error or the GTIN was never assigned to the product. Syntax validation and destination testing solve different problems.
How to test a Digital Link before use
- Validate the GTIN check digit and 14-digit representation.
- Confirm each AI is allowed in its role and values meet length and character rules.
- Open the URI and test resolver behavior, redirects, languages and failure states.
- Use the Barcody Digital Link validator for a quick structural check.
- Use the official GS1 Barcode Syntax Resource and the applicable GS1 specifications for conformance.
- Verify the final printed symbol and run it through actual target workflows.
Authoritative references
- GS1 Digital Link Standard: URI Syntax—normative rules and official URI examples.
- GS1 Barcode Syntax Resource—official translation and syntax validation.
- GS1 Application Identifiers—definitions for the numeric data prefixes.