Skip to main content
Guide

GS1 Digital Link Explained: One QR for POS and Phone

How one 2D barcode carries the retail GTIN for the till and a working URL for the phone — URL syntax, AI placement and resolver basics.

By ReadBarcode 7 min read Published 21 May 2026

Marketing wants one QR on the front of the new pack. It needs to open the product page on the brand site when a shopper scans it with their phone. IT wants a different QR on the back of the pack — the one carrying the GTIN that the Sunrise-ready till will scan. Procurement looks at both and asks if maybe the back-of-pack QR could be the front-of-pack QR, since that's one less thing to print. That's the conversation GS1 Digital Link exists to settle: a single 2D barcode whose value is a URL that the phone can open AND the POS can parse for a GTIN.

This guide walks through how the URL is built, which Application Identifiers go in the path versus the query string, when a brand needs its own resolver, and how a Sunrise-ready POS actually pulls the GTIN out of what looks, to anyone else, like a normal web link.

The short answer

A GS1 Digital Link is a URL whose path follows a GS1-defined grammar. The path segments encode an Application Identifier and its value — /01/<GTIN> for the GTIN itself, optionally followed by /10/<batch>, /17/<expiry> and so on. Render that URL as a QR Code (the consumer default) or a Data Matrix (the industrial default) and the same symbol works as a shopper-facing URL and as a GS1 carrier for retail POS.

QR · GS1 Digital Linkhttps://id.gs1.org/01/05012345678900/10/ABC123/17/261231
QR Code encoding a GS1 Digital Link URL — GTIN 05012345678900, batch ABC123, expiry 2026-12-31. Phone cameras open it as a URL; Sunrise-ready POS extracts the GTIN from the /01/ path segment.

Anatomy of a GS1 Digital Link URL

Take the URL embedded in the QR above and walk through it piece by piece:

https://id.gs1.org/01/05012345678900/10/ABC123?17=261231
  • https://id.gs1.org — the resolver domain. Any HTTPS-capable hostname works; id.gs1.org is the canonical community-run resolver that returns brand-supplied content for any registered GTIN.
  • /01/05012345678900 — the primary key, always AI 01 (GTIN) followed by the 14-digit GTIN value. UPC-A and EAN-13 are left-padded to 14 digits when they sit in a Digital Link path.
  • /10/ABC123 — a qualifier: AI 10 (batch / lot), value ABC123. Qualifiers narrow the identity to a specific production batch.
  • ?17=261231 — a data attribute in the query string: AI 17 (expiry date), YYMMDD encoded.

The full grammar is in the GS1 Digital Link standard. The two things to remember in practice: every URL starts with /01/<GTIN> as the first path segment after the resolver host, and every subsequent identifier sits in alternating /AI/value pairs along the path.

Path AIs vs query AIs

Not every Application Identifier belongs in the path. GS1 splits AIs into two roles inside a Digital Link:

Path AIs (qualifiers)
  • 01 — GTIN (always first)
  • 10 — Batch / lot
  • 21 — Serial number
  • 235 — Third-party-controlled serial
  • 414 — GLN of physical location

AIs that narrow the identified product. Sit in the URL path.

Query AIs (data attributes)
  • 11 — Production date
  • 13 — Packaging date
  • 15 — Best-before date
  • 17 — Expiry date
  • 22 — Consumer product variant
  • 240 — Additional product ID

AIs that carry per-unit data. Sit in the query string.

In practice the two forms are interchangeable in terms of what POS extracts — the parser handles both — but the GS1 convention is to put product-identity AIs in the path and per-unit data in the query string. Most resolvers and POS stacks accept the relaxed form (everything in the path) too.

Custom resolver domains

The resolver domain is whatever lives between https:// and the first path segment. id.gs1.org is the canonical resolver — it works for any GS1-issued GTIN and returns content registered by the brand owner. Many brands instead stand up their own resolver at their own domain.

# Canonical GS1 resolver (always works)
https://id.gs1.org/01/05012345678900

# Brand-owned resolver (same grammar, owned domain)
https://yourbrand.com/p/01/05012345678900

# Either URL is a valid GS1 Digital Link — POS pulls
# 05012345678900 from the /01/ path segment in both.

A brand-owned resolver is a thin web service that answers any /01/<GTIN>… request and either redirects to the right product page or returns the content directly. The work is in three parts: standing up the service, mapping every GTIN to a destination, and (for traceability) reading the AIs that arrived alongside the GTIN. Several SaaS vendors offer this off the shelf; the open-source Digital Link Toolkit from GS1 covers the parsing rules if you're building your own.

Rendering as QR or Data Matrix

The symbology is independent of the payload. Both QR Code and Data Matrix can carry a Digital Link URL of any length within their respective capacity limits.

QR — consumer default
QR · Digital Linkhttps://id.gs1.org/01/05012345678900/10/ABC123/17/261231
Same Digital Link URL rendered as QR — works on phone cameras, on Sunrise-ready POS, and as a printable shape that handles ~30% damage.

Phone cameras decode QR natively. The right choice for front-of-pack.

Data Matrix — industrial default
Data Matrix · Digital Linkhttps://id.gs1.org/01/05012345678900/10/ABC123/17/261231
Same URL as a GS1 Data Matrix — the carrier of choice when symbol size matters more than the phone scan story.

Denser at small sizes. Use for pharma / electronics packaging.

To prototype either form for proofing, use the GS1 Digital Link Generator. It builds the URL from a GTIN plus AIs and renders both the QR and the Data Matrix from the same payload.

How POS extracts the GTIN

When a Sunrise-ready POS scans a GS1 Digital Link QR, it doesn't open the URL. It parses the URL locally and reads the path:

  1. The scanner decodes the QR to a string. The string starts with https:// (or http:// for some older resolvers).
  2. The POS application strips the scheme and host, leaving a path like /01/05012345678900/10/ABC123.
  3. It walks the path in pairs: AI 01 means the next segment is a GTIN-14, AI 10 means the next segment is the batch, and so on. The grammar is deterministic, so no schema lookup is needed.
  4. The extracted GTIN goes into the same lookup pipeline that a 1D EAN feeds; the till posts the price, the back-office picks up the batch / expiry.

To verify a URL parses cleanly, paste it into the decoder. The same input feeds into the same logic POS uses:

GS1 Digital Link Decoder

Parse any GS1 Digital Link URL into structured GTIN + AI data.

Decode the worked example

Common mistakes

  • Confusing a marketing QR with a Digital Link. A QR opening https://yourbrand.com/campaign isn't a Digital Link — there's no /01/ path segment for POS to grab a GTIN from. Both can sit on the pack; only the Digital Link form is Sunrise-ready.
  • Padding the GTIN wrong. The path segment expects 14 digits. UPC-A (12 digits) and EAN-13 (13 digits) are left-padded with zeros. Get the padding wrong and POS reads a different (or invalid) GTIN.
  • Encoding dates in the wrong format. Date AIs use YYMMDD — six digits, no separators. Encoding 17=2026-12-31 instead of 17=261231 breaks the parse.
  • Mixing path and query syntax without testing. The relaxed form of the standard allows both, but some older POS stacks only handle the strict split. If you're targeting older retail systems, keep qualifiers in the path and data attributes in the query.
  • Putting the resolver behind a redirect. A Digital Link URL needs to be the one printed on the pack. A redirect to a marketing URL works for the phone but loses the AI structure for POS.

Quick decision guide

  • Default resolver: https://id.gs1.org/01/<GTIN>…. Always works, costs nothing, perfectly Sunrise-compliant.
  • Branded resolver: stand one up only if you want analytics, brand voice or to enrich the page with batch-aware content. Not required for Sunrise.
  • Carrier choice: QR for any consumer-facing pack (phone scans matter). Data Matrix for pharma / industrial when symbol size dominates.
  • Validate before press. Build the URL with the Digital Link Generator, decode it back with the Digital Link Decoder, confirm POS will extract the right GTIN and AIs.

Frequently asked

Is a GS1 Digital Link just a normal QR code?

Visually, yes — it's a standard QR Code symbol that any phone camera reads. The difference is in the encoded value: a GS1 Digital Link's value is a URL whose path follows a GS1-defined grammar, so the same scan can serve a shopper's phone (opens as a URL) and a Sunrise-ready POS (extracts the GTIN deterministically).

Do I have to use id.gs1.org?

No. id.gs1.org is the canonical resolver that always works for any GS1-issued GTIN, and it's the safe default if you don't want to run anything yourself. Most brands eventually deploy their own resolver — a small web service that handles the same /01/<GTIN>/… path grammar at their own domain — so the URL on the pack carries their branding.

Can I encode batch and expiry inside a Digital Link?

Yes — the AIs you'd put in a GS1 Data Matrix go into the path or the query string. Batch (AI 10) is variable-length and goes in the path after the GTIN; date AIs (11/13/15/17) are usually in the path. The Digital Link standard lists which AIs are 'qualifiers' (allowed in the path) and which are 'attributes' (typically query-string).

How does a phone scan handle a Digital Link?

Identically to any other URL QR — the phone camera recognises the QR, the OS extracts the URL, and the user lands on whatever page the resolver returns. Brands typically resolve a Digital Link to a product page on their own site, optionally enriched with batch / expiry context if those AIs were encoded.

Can I render a Digital Link as a Data Matrix instead of a QR?

Yes — the symbology is independent of the payload format. GS1 recommends QR for consumer-facing packs (because phone cameras handle QR best) and Data Matrix for industrial / pharma contexts where the symbol size matters more than the phone scan story. Either symbology carries the same Digital Link URL.

Does a Digital Link work without internet?

The POS scan works without internet — the scanner extracts the GTIN from the URL path locally, no DNS or HTTP involved. The shopper's phone scan does need internet to open the URL, the same as any other QR that points to a web page.

References

  • GS1 Digital Link standard — the canonical document defining the URL grammar, qualifier / attribute split and resolver behaviour. Published by GS1.
  • GS1 General Specifications — the AI table that the path segments draw from: gs1.org/standards/general-specifications.
  • GS1 "2D at POS" — Sunrise 2027 milestones that make Digital Link the default consumer-pack 2D carrier: gs1.org/standards/2d-at-pos.

Need to ship a Digital Link tomorrow? Build one with the GS1 Digital Link Generator, decode it with the GS1 Digital Link Decoder, and match the Sunrise context in the Sunrise 2027 page.

Next read

More guides