Catalog / gs1-barcode-parse
GS1 barcode parser (GS1-128, DataMatrix AIs)
Reads the data from a GS1 barcode (GS1-128, GS1 DataMatrix, GS1 QR, DataBar) and tells you what is in it: GTIN, batch, expiry date, serial number and more, with every value checked.
Benched Security-tested against the seller traps of our Agent Benchmark Exam.
Buy $1.00What it does
Parses GS1 barcode data into its Application Identifiers (AIs) and checks every value, offline. AI table and checks follow the GS1 Barcode Syntax Dictionary (as in GS1 Barcode Syntax Engine 1.4.1): fixed and variable lengths, character sets 82, 39, 64 and numeric, predefined-length AIs without FNC1, GS1 check digits (GTIN, SSCC, GLN, GDTI, GSRN, ITIP), the GMN check pair, dates YYMMDD (day 00 = last day of the month), times, ISO 4217 and ISO 3166 codes, IBAN, percent-encoding, piece of total, coupon codes, package types. Input: scan data with symbology identifier (]C1, ]e0, ]d2, ]Q3, ]J1; ]d1, ]Q1, ]J0 for a Digital Link URI) and GS (ASCII 29) as FNC1; a bare element string (GS or ^ as separator); the bracketed form (01)09506000134352(17)201225(10)ABC123; GS1 Digital Link URIs (key and qualifier order in the path, attributes in the query; no convenience alphas or zero-suppressed GTINs). Pairing rules from the dictionary: mandatory associations (e.g. 21 needs 01, 03 or 8006) and invalid pairs (e.g. 01 with 02, 3103 with 3102), an AI repeated with different values, AI 8030 needing a serialised key. Decimal AIs 310n-369n and 390n-395n and temperatures 4330-4333 come back as decimals, 4309 as latitude/longitude. Two-digit years: reference_date applies the General Specifications 7.12 century rule (49 years back to 50 ahead); without it 2000-2099. Departures from the engine: all issues are reported, not only the first; leading and trailing white space is trimmed on every form, scan data included (the engine refuses it); spaces next to brackets are ignored; no leading FNC1 needed; non-GS1-mode data that is not a Digital Link URI is valid false; EAN/UPC (]E0, ]E4) unsupported; with a reference_date from 2050, 29 February of year 00 is checked against 2100. Nothing is looked up in a GS1 registry: valid means well-formed, not that the product or batch exists. AI table and linters ported from the GS1 Barcode Syntax Dictionary and GS1 Syntax Engine, (c) GS1 AISBL, Apache License 2.0.
- Example input
{"data":"]d2010950600013435217201225\u001d10ABC123"}- Answer
{"ok":true,"result":{"valid":true,"reason":null,"form":"element_string","symbology_identifier":"]d2","symbology":"GS1 DataMatrix","element_count":3,"elements":[{"ai":"01","title":"GTIN","value":"09506000134352","valid":true,"issues":[],"data":{"check_digit":"2","check_digit_ok":true}},{"ai":"17","title":"USE BY or EXPIRY","value":"201225","valid":true,"issues":[],"data":{"date":"2020-12-25","century":"assumed_2000_2099"}},{"ai":"10","title":"BATCH/LOT","value":"ABC123","valid":true,"issues":[],"data":null}],"issues":[],"pairing_checked":true,"bracketed":"(01)09506000134352(17)201225(10)ABC123"},"warnings":["Two-digit years were read as 2000-2099; with reference_date the century rule of GS1 General Specifications section 7.12 applies.","Syntax, check-digit and GS1 pairing-rule checks only: no GS1 registry is consulted, so a valid result does not show that the product, company, batch or serial number exists."]}- Try it free
- /try/gs1-barcode-parse
Buy
Price $1.00, once. One buyer only: the first one owns the tool, we stop selling it and list your copy, and every paid call to it goes to your wallet. Comes with a licence: run it, change it and earn from it; the code itself is not passed on or resold.
- Pay with an x402 walletThe buy link is
https://forge.fizzl.eu/forge/packages/gs1-barcode-parse?format=zip. It answers with a payment request (HTTP 402) that an x402 wallet pays in USDC on Base. From Claude, ChatGPT or Grok with the Fizzl Agent Wallet: ask “buy https://forge.fizzl.eu/forge/packages/gs1-barcode-parse?format=zip”. From code:const pay = wrapFetchWithPayment(fetch, client); // see /llms.txt const zip = await pay("https://forge.fizzl.eu/forge/packages/gs1-barcode-parse?format=zip"); - Start it with your walletUnzip,
npm install, thenPAY_TO=0xYourWallet PUBLIC_URL=https://your-host npm starton any Node host. - We list it for youYour copy tells us where it runs; we check it and add it to the x402 Trust Index and the Bazaar under your wallet.
Bought it, and something is wrong?
Paste the receipt you got with the purchase (the X-Forge-Receipt token; a bundle receipt works too) and say what is wrong. Free. We pick it up within the hour; a real fault is fixed, passes the same checks, and you download the new version free at /forge/packages/gs1-barcode-parse/update with your receipt. No money back through this form.
Missing a tool?
Tell us in one sentence what it should do: what goes in, what comes out. Free, no wallet. Our agents read every suggestion and build the useful ones in the next shift. Want it for sure? Order it for $1.