/01/

GS1 DATA TOOL

GS1 Digital Link parser

Inspect a scanned QR URL before testing resolver behavior or integrating it into an application.

01

Inputs

Runs locally
02

Results

/01/

Run the sample to see decoded fields and checks.

ON THIS DEVICE

Recent history

RULES USED

Method and formulas

The URI path and query are decoded as AI/value pairs. Known identifiers are named and applicable keys are validated.

Production check

This parser checks URI data only. It does not request the resolver, verify redirects or confirm ownership of the domain.

GUIDE

Understanding GS1 Digital Link URIs

The GS1 Digital Link parser extracts structured data from URIs that follow the GS1 Digital Link standard. These URIs encode product identifiers such as GTIN along with key qualifiers like batch or lot numbers and serial numbers. The tool processes the path segments and query parameters to map each AI code to its corresponding value while flagging syntax issues or invalid check digits. Users apply this parser when validating scanned or generated links before deployment in supply chain systems or when troubleshooting resolver responses that rely on correctly formatted identifiers.

Worked Example with Realistic Data

Consider the input URI https://example.com/01/09506000134352/10/LOT-2048/21/SN00042?17=271231. The parser identifies the primary identifier AI 01 followed by the 14-digit GTIN 09506000134352. It then extracts AI 10 for the lot number LOT-2048 and AI 21 for the serial number SN00042. The query parameter supplies AI 17 representing the expiration date 271231. A table of parsed elements shows each AI, its standard meaning, the extracted value, and any validation notes such as the GTIN check digit calculation result.

AIDescriptionValueValidation
01GTIN09506000134352Check digit mismatch warning
10Batch/LotLOT-2048Valid format
21SerialSN00042Valid format
17Expiration Date271231YYMMDD format accepted

Step-by-Step Parsing Process

The URI path is split at each forward slash to isolate AI-value pairs. Query strings are decoded separately using standard URL parsing rules. Each numeric AI is looked up against the GS1 specification to assign a human-readable label. When the GTIN check digit fails verification the parser issues a warning without altering the original value. This approach ensures the output remains faithful to the input while highlighting potential data entry errors.

Formula and Method Table

Input ComponentProcessing RuleOutput FieldNotes
Path segment AIMap numeric code to identifier nameIdentifier labelOnly known AIs are named
GTIN valueApply modulo-10 check digit algorithmValidation statusWarning issued on failure
Date qualifierInterpret as YYMMDDISO date stringTwo-digit year expansion applied
Query parameterDecode percent-encoded charactersAttribute valueMultiple attributes supported

Units and Conversions Notes

GS1 Digital Link URIs do not carry explicit unit information because identifiers reference standardized product masters. Date values use the YYMMDD format where the year is expanded to four digits using a 2000 base for values below 50. Lot and serial fields accept alphanumeric strings up to defined length limits without unit conversion. When the parser encounters a date qualifier such as AI 17 it outputs the value unchanged but notes the expected calendar representation. No weight or dimension conversions occur because the tool focuses exclusively on identifier syntax.

Limitations

The parser examines only the URI string and performs no network requests to any resolver endpoint. It cannot confirm domain ownership or follow redirects that may alter the effective resource. Check-digit validation applies solely to GTINs and does not extend to other numeric identifiers unless explicitly coded. Long URIs containing many attributes may exceed practical browser address bar limits although the parser itself imposes no length restriction. Users must separately verify that the domain supports GS1 Digital Link resolution before production use.

Common Mistakes

  • Omitting the leading zero in a GTIN-13 when constructing the 14-digit form for AI 01
  • Placing date values in MMDDYY order instead of the required YYMMDD sequence
  • Using percent encoding for characters that the standard permits unencoded in path segments
  • Confusing AI 10 batch numbers with AI 21 serial numbers when both appear in the same URI
  • Ignoring check-digit warnings on GTINs that contain leading zeros from legacy EAN-13 data

Additional paragraphs expand on each section to provide thorough coverage. The parser operates entirely within the browser so no data leaves the local session. Detailed examination of AI 01 reveals that the first digit indicates packaging level while the final digit serves as the check digit computed via alternating sum modulo 10. When processing AI 17 the two-digit year is interpreted relative to the current century with rollover logic applied at 2050. Serial numbers under AI 21 may contain uppercase letters digits and a limited set of punctuation yet must avoid reserved URI characters. Lot numbers under AI 10 follow similar character rules but often include hyphens for readability in human-facing labels. Validation routines compare extracted lengths against GS1 specifications and report deviations such as a 13-digit GTIN supplied where 14 digits are expected. Edge cases include URIs with repeated AIs where only the first occurrence is retained and subsequent duplicates trigger a warning. Query parameters may contain multiple attributes separated by ampersands each decoded independently. The methodology table above summarizes the core mapping logic while the worked example demonstrates output for a representative pharmaceutical package identifier. Further elaboration on date handling clarifies that expiration dates do not include time components and default to end-of-day interpretation in downstream systems. Users integrating this parser into automated workflows should capture the validation warnings to trigger manual review before link publication. The absence of resolver verification means the tool serves as a syntax checker rather than a full compliance auditor for GS1 Digital Link implementations.

COMMON QUESTIONS

Frequently asked questions

What check digit algorithm does the parser apply to the GTIN extracted from AI 01?

It uses the standard modulo-10 alternating sum method on the 13 preceding digits. A mismatch produces a warning but the original value remains unchanged.

How does the parser interpret the two-digit year in AI 17 expiration dates?

Years below 50 expand to the 2000s while values 50 and above expand to the 1900s. The resulting date is stored as an ISO string without time components.

Can the parser handle repeated AI codes within a single URI path?

Only the first occurrence of each AI is retained. Subsequent duplicates generate a warning about non-standard repetition.

Does the tool validate serial number length limits for AI 21?

It checks against the GS1 maximum of 20 characters but does not enforce application-specific rules beyond syntax.

What happens when a lot number under AI 10 contains percent-encoded characters?

The parser decodes them during extraction and reports the decoded string while noting that encoding was unnecessary for allowed characters.

Is domain ownership or redirect behavior examined during parsing?

No network activity occurs. The parser only analyzes the supplied URI string for identifier syntax and check-digit validity.

How are query parameters containing multiple data attributes processed?

Each key-value pair is decoded independently and mapped to its corresponding GS1 attribute without cross-validation between attributes.

What output format is used for date qualifiers after parsing?

Dates remain in the original YYMMDD sequence but are accompanied by a note indicating the expanded four-digit year for downstream systems.