---
title: GS1 Barcode Decoder & AI Parser | DataMatrix, GS1-128 & QR to JSON
description: Decode GS1 Application Identifiers (GTIN AI 01, Lot AI 10, Expiration AI 17, Serial AI 21, SSCC AI 00) and GS1 Digital Link 2D web URIs into strongly-typed JSON.
canonical: https://stanzaapi.com/tools/gs1-decoder/
---

[Home](/)/[API Directory](/tools/)/GS1 Barcode & Digital Link Decoder (Sunrise 2027) API

 <5ms Edge Latency99.9% SLA AvailableVerified: Sep 2026V8 Pure ComputeRetail & Supply Chain

# 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.

[Subscribe & Get API Key →](/tools/pricing)[⚡ Live Playground](#live-playground)[Specs (11)](#specifications)

 Interactive Edge Workbench

## ⚡ 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$.

32KB Demo Cap60 req/min Burst<2ms V8 ComputeZero Data Retention

input.txt0 B

 Reset

1

(01)00300012345678(10)BATCH123(17)261231(21)SER987

 RUN VALIDATION (<5ms) [ CHECKSUM: AWAITING RUN ]

output.jsondemo-ready

Status: Ready Copy

```
{
  "status": "Click RUN VALIDATION to execute on the Cloudflare edge..."
}
```

Sandbox Quota: Free Tier (50 reqs/mo) • Production keys from $29/mo[Get Free Sandbox Key →](/login?email=)

Need 512KB+ Payloads, High-Throughput & 99.9% Production SLA?

Direct API keys include pooled monthly quotas, zero cold-starts, and HIPAA BAA eligibility on the Mega tier.

[Get Production API Key →](/pricing)

## 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 →](/tools/gs1-decoder/ai/01-gtin)[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 →](/tools/gs1-decoder/ai/10-batch-lot)[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 →](/tools/gs1-decoder/ai/17-expiration-date)[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 →](/tools/gs1-decoder/ai/21-serial-number)[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 →](/tools/gs1-decoder/ai/00-sscc)[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 →](/tools/gs1-decoder/ai/gs1-digital-link-uri)[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 →](/tools/gs1-decoder/ai/02-content)[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 →](/tools/gs1-decoder/ai/37-count)[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 →](/tools/gs1-decoder/ai/30-var-count)[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 →](/tools/gs1-decoder/ai/gs1-128-vs-datamatrix-vs-qr)[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 →](/tools/gs1-decoder/ai/fnc1-ascii-29-separator)

## 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.

HTTP 200 Response PayloadCopy

```
{
  "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:

cURLCopy

```
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"
}'
```

Node.js (Fetch)Copy

```
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);
```

Python (Requests)Copy

```
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())
```

GoCopy

```
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

What is GS1 Sunrise 2027?

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).

How are variable-length GS1 Application Identifiers separated?

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.

How do I decode a GS1 barcode online for free?

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.

Can I scan a GS1 DataMatrix with a phone?

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.

What is the FNC1 / ASCII 29 separator?

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.](/tools/pharma-dscsa/)[FDA AccessGUDID & IMDRF UDI Decoder → — Decode unique device identification barcodes for hospital asset tracking and EU MDR.](/tools/udi-decoder/)[ISO 6346 Intermodal Container Validator → — Validate BIC container prefixes and check digits on freight packaging and pallets.](/tools/container-validator/)
