GS1-128 Builder & Validator

Build GS1-128 barcode data from Application Identifiers (GTIN, batch/lot, expiry, SSCC, and more), or paste existing data to validate and decode it.

Runs entirely in your browser — nothing is uploaded.

Try an example:

What GS1-128 is, and how it differs from plain Code 128

GS1-128 isn't a separate barcode symbology — it's Code 128 with a reserved leading character (FNC1) that tells a scanner "what follows is GS1-structured data made of Application Identifiers," rather than arbitrary text. That one convention is what lets a single barcode carry a GTIN, a batch/lot, a serial number, and an expiry date together, each self-describing, in a format every GS1-aware scanner and warehouse system already knows how to parse — instead of a proprietary format only your own systems understand.

FNC1, explained properly

Every Application Identifier has either a fixed length (a GTIN is always 14 digits; an expiry date is always 6) or a variable length up to some maximum (a batch/lot code can be 1 to 20 characters). A scanner reading fixed-length data knows exactly where a value ends without any extra signal. A scanner readingvariable-length data has no way to know where the value stops and the next AI begins — unless something marks the boundary. That something is FNC1: a special non-printing character inserted immediately after a variable-length AI's value, but only when another AI actually follows it. If a variable-length AI is the last thing in the string, there's nothing left to disambiguate, so no separator is needed there either. Getting this placement right — not omitting a needed one, and not adding an unneeded one — is the single most common way a hand-built GS1-128 string breaks.

Fixed vs. variable length AIs

GTIN (01), dates (11/15/17), SSCC (00), and GSRN (8018) are all fixed-length — always exactly as many digits as their definition specifies, zero-padded if needed. Batch/lot (10), serial number (21), and CPV (22) are variable-length: as short or as long as the actual value, up to a defined maximum. This distinction is exactly what drives the FNC1 rule above, and it's why this tool needs to know each AI's definition, not just its numeric code, to build or parse a string correctly.

Check digit calculation, with a worked example

GTIN, SSCC, GDTI, GCN, GRAI, and GSRN all end their fixed-length numeric block in a mod-10 check digit computed over the preceding digits: starting from the digit immediately before the check digit and working left, multiply alternating digits by 3 and 1 (3 first), sum the results, and the check digit is whatever brings that sum up to the next multiple of 10. For GTIN 0950600013435, that calculation lands on 2 — matching the full, valid GTIN-14 09506000134352 used throughout this tool and the GS1 Digital Link generator's own examples. Change any single digit in the data and the check digit almost certainly stops matching, which is the entire point: it catches a mistyped or misscanned digit before it reaches a system that would otherwise silently accept it.

Implied decimal points

Measurement AIs like net weight (310n/320n) encode a decimal value as a fixed-width digit string with the decimal point's position implied by the AI code's own last digit, rather than by a literal decimal point character. AI 3103 means "kilograms, 3 implied decimal places" — so 2.5 kg becomes the 6-digit string002500 (2500 scaled back by 3 decimal places). Get the AI's decimal-place digit wrong and the value is still valid-looking data, just off by a factor of 10 or more — this class of error is invisible until someone notices a pallet apparently weighs 2,500 kg.

Why concatenation order matters

Unlike GS1 Digital Link's Digital Link URI (which has one mandated qualifier order), GS1-128 element strings don't require any particular AI order — but *consistency* still matters operationally: trading partners' receiving systems, once built and tested against one supplier's ordering convention, sometimes fail (or silently misparse) when a different supplier sends AIs in a different order, especially if either side's implementation makes unwarranted assumptions about ordering rather than parsing generically. Picking one consistent order across your own labels — and confirming your trading partners' systems parse generically rather than positionally — avoids a class of integration bug that has nothing to do with the data being technically valid GS1-128.

Testing with a real scanner

Print an actual test label at production size, on production label stock, and scan it with the actual scanner model your trading partner or warehouse uses — not just this tool's own preview. This matters even more for GS1-128 than for a QR code: a laser or imaging scanner's tolerance for print quality, contrast, and quiet zone differs meaningfully from a phone camera, and label rejections from a receiving partner are the most common way a GS1-128 encoding mistake gets discovered — usually well after the label has already shipped.

The most common rejection reasons from trading partners

In rough order of frequency: a missing or misplaced FNC1 separator; a check digit that doesn't match (almost always a data-entry error, not a calculation error, once the encoding logic itself is correct); an AI used with the wrong fixed length (a GTIN entered as 13 digits instead of 14, most often); and implied-decimal measurement AIs encoded with the wrong decimal-place digit. This tool's validator catches all four categories directly, which is exactly why pasting a string here before it ships is worth the extra minute.

Frequently asked questions

When does a GS1-128 element string need an FNC1 separator?

Only after a variable-length AI's value, and only when another AI follows it. Fixed-length AIs (like a 14-digit GTIN) never need one — a receiving system already knows exactly how many characters to read — and nothing needs one at the very end of the string.

Why does the parser sometimes show an invisible separator?

Real scanner output carries the GS1 field separator as ASCII 29 (the Group Separator control character), which doesn't print or display as a visible glyph. Pasting scanner output straight from a keyboard-wedge scanner usually preserves it correctly even though you can't see it; this tool detects and handles it the same as the visible <FNC1> marker.

Is AI 401 (GINC) really missing from the check-digit list?

Yes — GINC is a plain reference number with no embedded check digit, unlike GTIN, SSCC, GDTI, GCN, GRAI, and GSRN, which all do.

Get the GS1-128 Application Identifier cheat sheet

Occasional emails when we ship something new. Unsubscribe anytime.

Need this inside your own system?

This is the kind of integration work we do — wired into your ERP, MES, or line equipment, not a one-off tool.

See our services →