As European Digital Product Passport (DPP), EU Battery Passport and anti-refill wine & cosmetics authentication rollouts converge, engineering teams are replacing proprietary NFC query URLs with GS1 Digital Link URIs secured by NXP NTAG 424 DNA SUN (Secure Unique NFC) cryptographic mirrors. Yet custom encoding scripts routinely break at validation due to off-by-one SDMOffset byte math inside Type 4 NDEF file 0xE104. Generate verified URIs and exact hex offsets instantaneously in our GS1 Digital Link & NTAG 424 DNA offset builder alongside our NTAG 424 DNA SUN authentication guide.
1. Anatomy of a serialized GS1 Digital Link NFC URI
Instead of inventing an ad-hoc URL like https://brand.com/verify?sku=123&sn=456, GS1 Digital Link encodes standard GS1 Application Identifiers (AIs) directly in the HTTPS path and query string:
https://id.example.com/01/09506000134352/21/SN100042?10=L2611&picc=00000000000000000000000000000000&cmac=0000000000000000
| Segment | GS1 / NFC Role | Engineering rule |
|---|---|---|
https://id.example.com |
Brand resolver domain | Keep short (<= 18 chars) to conserve NDEF bytes and speed tap read time |
/01/09506000134352 |
AI (01) 14-digit GTIN |
Pad EAN-13 (0 + 13 digits) or UPC-A (00 + 12 digits) to 14 digits with valid Modulo-10 check digit |
/21/SN100042 |
AI (21) Serial number |
Maps 1-to-1 to the serial integer when paired with UHF SGTIN-96 |
?10=L2611 |
AI (10) Batch / lot |
Optional query key-value pair before dynamic mirror parameters |
&picc=<32-hex>&cmac=<16-hex> |
NTAG 424 DNA SUN mirror |
ASCII hex placeholders overwritten dynamically on every tap by AES-128 hardware |
2. Exact byte map inside Type 4 NDEF file 0xE104
When https:// is compressed using NFC Forum URI Identifier Code 0x04, a short-record (SR=1, payload < 256 bytes) NDEF file in NTAG 424 DNA lays out every byte as follows:
| Byte offset (Dec / Hex) | Field | Byte length | Value & pitfall |
|---|---|---|---|
0–1 (0x00–0x01) |
NLEN |
2 B |
Big-endian length of the NDEF message (5 + URI_body_len) |
2 (0x02) |
Record header | 1 B |
0xD1 (MB=1, ME=1, SR=1, TNF=0x01 Well-Known) |
3 (0x03) |
Type length | 1 B |
0x01 (1 byte for "U") |
4 (0x04) |
Payload length | 1 B |
1 + URI_body_len (includes 0x04 prefix code) |
5 (0x05) |
Record type | 1 B |
0x55 (ASCII 'U') |
6 (0x06) |
URI prefix code | 1 B |
0x04 — replaces all 8 characters of https://! |
7+ (0x07+) |
Stripped URI body | N B |
Starts at id.example.com/01/... (offset = 7 + index_after_https) |
ENCPICCData (SDMOffset): Points to the first'0'of your 32-characterpicc=placeholder (offset = 7 + strippedUrl.indexOf(piccZeros)).SDMMACInputOffset&SDMMACOffset: SetSDMMACOffsetto the first'0'of your 16-charactercmac=placeholder; setSDMMACInputOffsetequal toSDMOffset(or the start of the query string you want authenticated by AES-128 CMAC) and document that exact range in your verification backend!
3. Pre-encoding checklist before releasing roll orders
- Freeze your resolver domain & parameter names (
picc/cmacore/c) before mass key diversification—changing domain length later shifts everySDMOffsetbyte. - Keep numeric serials compatible with
SGTIN-96(<= 38-bitinteger, no leading zeros if round-tripping pure SGTIN-96) whenever items carry dual UHF + NFC tags. - Request physical pre-encoded samples via our NFC smart packaging & tap seals or samples page to verify both iOS Safari and Android Chrome tap latency on your actual packaging.