GS1 Barcode & Digital Link Decoder (Sunrise 2027) API
Universal GS1 barcode and 2D Digital Link parser designed for the Sunrise 2027 transition from 1D UPC/EAN to 2D DataMatrix and QR web codes.
⚡ Live Pure-Compute Playground
Test deterministic edge parsing with sub-2ms execution across 330+ Cloudflare V8 edge locations. Zero persistent storage, zero cold-starts, pure function $f(x)=y$.
{
"status": "Click RUN VALIDATION to execute on the Cloudflare edge..."
}
Key Capabilities & Performance Architecture
- ✓ Full support for GS1 Application Identifiers with variable-length FNC1 separation
- ✓ Bi-directional GS1 Digital Link URI encoder and decoder (Web URI <-> Raw Barcode)
- ✓ Arithmetic Modulo-10 checksum validation for GTIN-8, GTIN-12, GTIN-13, GTIN-14, and SSCC-18
- ✓ Date parser for YYMMDD and YYMM00 (end of month) expiration and production timestamps
- ✓ Pure compute edge runtime on Cloudflare Workers (<2ms latency)
Application Identifier (AI) Specifications (11 Specifications)
Explore full structural breakdowns, checksum logic, and field schemas for every supported format.
GS1 AI (01) Global Trade Item Number (GTIN) & Mod-10 Checksum
Instant Modulo-10 checksum validation and structure decomposition for GS1 AI (01) GTIN barcodes.
View Specification →GS1 AI (10) Batch / Lot Number Specification & FNC1 Rules
Parse manufacturing batch and lot numbers from GS1 barcodes with automatic FNC1 delimiter handling.
View Specification →GS1 AI (17) Expiration Date Specification (YYMMDD & YYMM00)
Parse GS1 expiration date timestamps into ISO 8601 dates with full support for YYMM00 end-of-month logic.
View Specification →GS1 AI (21) Individual Serial Number Specification
Extract unit-level serial numbers from 1D and 2D GS1 barcodes for track-and-trace systems.
View Specification →GS1 AI (00) Serial Shipping Container Code (SSCC-18) Spec
Validate 18-digit SSCC pallet and logistics shipping container codes in sub-1ms.
View Specification →GS1 Digital Link URI Standard & QR Web Transition (Sunrise 2027)
Deconstruct and build GS1 Digital Link web URIs for modern QR code consumer engagement and point-of-sale scanning.
View Specification →GS1 AI (02) CONTENT Global Trade Item Number Specification
Extract GS1 AI (02) CONTENT identifiers for variable-measure trade items and validate the embedded GTIN check digit.
View Specification →GS1 AI (37) COUNT of Trade Items Specification
Extract GS1 AI (37) COUNT quantities paired with AI (02) CONTENT for variable-measure retail barcodes.
View Specification →GS1 AI (30) VAR COUNT Specification for Variable-Measure Items
Extract GS1 AI (30) VAR COUNT quantities paired with AI (02) CONTENT for variable-measure barcodes.
View Specification →GS1-128 vs GS1 DataMatrix vs GS1 Digital Link QR Comparison
Compare GS1-128, GS1 DataMatrix, and GS1 Digital Link QR symbologies and how each encodes the same Application Identifiers.
View Specification →GS1 FNC1 / ASCII 29 (GS) Separator Rules for Variable-Length AIs
Parse FNC1 (ASCII 29 / <GS>) separators that terminate variable-length GS1 Application Identifiers.
View Specification →API Endpoints & Request Signatures
| Method | Path | Description |
|---|---|---|
POST | /api/v1/gs1/decode | Decode raw GS1 barcode string or FNC1 stream into JSON |
POST | /api/v1/gs1/digital-link/parse | Parse GS1 Digital Link URI into structured AI key-value pairs |
Sample Response JSON Payload
All endpoints deliver strongly-typed envelopes with deterministic parsing and performance metrics.
{
"success": true,
"data": {
"gtin": "00012345678905",
"gtinCheckDigitValid": true,
"attributes": {
"10": {
"name": "Batch/Lot",
"raw": "LOT123",
"value": "LOT123"
},
"17": {
"name": "Expiration Date",
"raw": "260831",
"value": "2026-08-31"
},
"21": {
"name": "Serial Number",
"raw": "SN9988",
"value": "SN9988"
},
"01": {
"name": "GTIN",
"raw": "00012345678905",
"value": "00012345678905"
}
},
"digitalLinkUri": "https://id.gs1.org/01/00012345678905/21/SN9988?10=LOT123&17=260831"
},
"meta": {
"latency_ms": 1.25,
"version": "1.0.0"
}
}
Multi-Language Integration Code
Copy and paste ready-to-run snippets with your direct API credentials:
curl --request POST \
--url "https://api.stanzaapi.com/gs1-decoder/api/v1/gs1/decode" \
--header "Content-Type: application/json" \
--header "x-api-key: YOUR_API_KEY" \
--data '{
"barcode": "010001234567890510LOT123\u001d1726083121SN9988"
}'
const response = await fetch("https://api.stanzaapi.com/gs1-decoder/api/v1/gs1/decode", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.API_KEY || "YOUR_API_KEY"
},
body: JSON.stringify({
"barcode": "010001234567890510LOT123\u001d1726083121SN9988"
})
});
const data = await response.json();
console.log(data);
import requests
import json
url = "https://api.stanzaapi.com/gs1-decoder/api/v1/gs1/decode"
headers = {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY"
}
payload = {
"barcode": "010001234567890510LOT123\u001d1726083121SN9988"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
url := "https://api.stanzaapi.com/gs1-decoder/api/v1/gs1/decode"
payload := []byte(`{"barcode":"010001234567890510LOT123\u001d1726083121SN9988"}`)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
req.Header.Add("Content-Type", "application/json")
req.Header.Add("x-api-key", os.Getenv("API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Frequently Asked Questions
Sunrise 2027 is the global retail initiative transitioning point-of-sale systems from traditional 1D EAN/UPC barcodes to 2D barcodes (QR codes with GS1 Digital Link and GS1 DataMatrix).
Variable-length elements (like Lot number AI 10 and Serial number AI 21) use the ASCII 29 group separator (<GS> or FNC1) to signal the end of data when followed by another AI.
Paste the raw scanner output into the GS1 decoder on this page and submit it. The engine maps every Application Identifier to a named field, validates GTIN and SSCC Modulo-10 check digits, and returns typed JSON in under 2ms.
Yes. Any camera-based scanner app that reads GS1 DataMatrix or QR can produce the raw payload, which you then paste into the decoder. GS1-128 and DataMatrix use FNC1 (ASCII 29) to delimit variable-length AIs, while GS1 Digital Link QR encodes the same AIs as a web URI.
FNC1 is a non-data symbol used in GS1-128 and DataMatrix to mark the end of a variable-length Application Identifier. It is transmitted as ASCII 29 (GS, 0x1D). Without it, a parser cannot tell where a variable-length value such as AI (10) batch/lot ends and the next AI begins.
Complementary Enterprise APIs
Seamlessly orchestrate data pipelines across adjacent financial, regulatory, and supply-chain protocols:
FDA DSCSA Drug Serialization →
Parse GS1 DataMatrix barcodes with NDC conversion for FDA DSCSA pharma compliance.
FDA AccessGUDID & IMDRF UDI Decoder →
Decode unique device identification barcodes for hospital asset tracking and EU MDR.
ISO 6346 Intermodal Container Validator →
Validate BIC container prefixes and check digits on freight packaging and pallets.