GS1 Parser
Decode a GS1 element string — the one printed under a GS1-128 barcode or encoded in a GS1 DataMatrix — segment by segment, and verify the check digits, right in the browser.
Human-readable (01)…(17)…(10)… form or raw scan data with FNC1 (^ or ] as the separator).
How it works
A GS1 string is a sequence of Application Identifier (AI) + value pairs. The parser recognises the two encodings you meet in practice:
- Human-readable (bracketed) form: the AI is in parentheses,
as in
(01)09506000134352(17)260331(10)ABC123— the plain-text interpretation printed beneath the barcode. - Raw scan data: no parentheses, and variable-length AIs are
terminated by the
FNC1character (ASCII 29). Since FNC1 is invisible, the tool accepts^or]as a stand-in. The parser reads the AI by longest-known-prefix match, then the value by the AI's fixed length or up to the next FNC1.
For each element it shows the identifier, validates length and format
(numeric, YYMMDD date), and — for SSCC, GTIN and GLN — verifies
the check digit.
The GS1 check digit
The fixed-length GS1 identifiers (GTIN-14, SSCC-18, GLN-13) end in a
mod-10 check digit. Starting from the rightmost digit (excl.
the check digit), multiply alternately by 3 and 1, sum, and the check digit is
(10 − (sum mod 10)) mod 10. A single wrong digit fails the check —
it's the first thing an EDI partner verifies on receiving a DESADV.
Privacy
Limits
Related documentation
- GTIN, GLN — the GS1 identifiers in the glossary.
- EDIFACT — where these identifiers travel (EANCOM: DESADV, INVOIC, ORDERS).
- EDIFACT Validator — for the message that carries these codes.