Barcode · 10 tools · nothing uploads

GS1 Digital Link

Build a GS1 Digital Link URL from a GTIN, lot and serial, or parse one back apart, on your device.

Input

Options

live

GS1 Digital Link turns a GTIN into a resolver link, padding and validating it to 14 digits. Build mode can add an optional lot and serial into the path, plus an expiry date in the query string, since GS1's grammar keeps non-identifying attributes out of the path. Parse mode splits a link or path back into those fields.

Questions

What does build mode create?

A resolver URL from a GTIN, padded and checked to 14 digits, with an optional lot and serial written into the path as /10/LOT and /21/SERIAL, and an optional expiry date added to the query string as ?17=YYMMDD.

How does parse mode work?

It reads a full URL or a bare path like /01/09501101530003/10/LOT7, splits it into AI and value pairs two segments at a time, and prints each one with its GS1 attribute name: GTIN, LOT, SERIAL, EXPIRY or CPV.

Why is expiry in the query string instead of the path?

Because GS1s own Digital Link grammar only allows GTIN, LOT and SERIAL as path qualifiers. EXPIRY is a non-identifying data attribute rather than an identifier, so the grammar puts it in the query string instead, the same place any other non-identifying attribute would go.

What happens if I give it an invalid GTIN?

It is refused before a URL is built. A GTIN has to be 8, 12, 13 or 14 digits after stripping spaces and dashes, and its check digit has to match; a wrong check digit is named in the error along with the value it should have been.

Can I point it at a different resolver domain?

Yes. domain defaults to https://id.gs1.org and can be set to any resolver you use instead; it is only used in build mode, since parse mode reads whatever domain the URL you paste in already carries.

Compare

ToolRuns on the CLILive as you type
GS1 Digital LinkYesYes
QR code batchYesNo
Barcode check digitYesYes

Related Barcode tools