EAN Check.comEAN Check.com

GS1-128 Parser

Paste any GS1-128 barcode, paren notation, FNC1-delimited scanner output, or GS1 Digital Link URL, and get every Application Identifier broken down with validation, category colour-coding, and round-trip export to all three formats plus QR code.

By The eancheck teamPublished Updated

Format: waiting for input

What is a GS1-128 barcode?

A GS1-128 is a Code 128 barcode carrying structured data defined by GS1. On its own, Code 128 is a way of encoding any text into bars and spaces. What makes a Code 128 barcode a GS1-128 is the FNC1 character at the start, which tells the receiving software that the characters that follow are a chain of GS1 Application Identifiers and their values, not free-form text.

You see them on pallet tags, carton labels, pharmaceutical packaging and the labels on cases of fresh food. One symbol can hold a GTIN, a batch number, an expiration date, a serial number, a net weight and a shipping container code at once.

The parser on this page accepts a raw GS1-128 scan, the human-readable string in brackets printed on a label, or a GS1 Digital Link URL. It normalises all three into the same AI breakdown and exports to whichever form you need next. To check a whole column of label strings at once, use the bulk GS1-128 parser.

Application Identifiers, in one page

An Application Identifier is a code of two, three or four digits that comes before a value and tells you what the value means. AI (01) always means "the next 14 digits are a GTIN". AI (17) always means "the next 6 digits are an expiration date in YYMMDD format". AI (10) means "what follows is a batch number, up to 20 alphanumeric characters, ending at the next FNC1". Every AI is documented in the GS1 General Specifications. Learn half a dozen common ones and you can read many GS1-128 labels by eye.

The AIs fall into five groups. Identification AIs like (01) GTIN, (00) SSCC and (02) contained GTIN identify trade items and logistic units. Traceability AIs like (10) batch and (21) serial say which production run or which single unit this is. Dates (production, best-before, sell-by, expiry) all use the 6-digit YYMMDD format. Measurements in the 3xxx range encode weight, length and volume, with the decimal place set by the last digit of the AI itself, so (3103) means "net weight in kilograms with 3 decimals". Logistics AIs like (400) purchase order and (410) to (417) GLNs identify parties and shipments.

Try editing the example below. Click any segment to see its full definition: name, format rule, help text, a real example, and the validation errors if the value does not conform.

Anatomy of a GS1-128 string

Click any segment below to open a breakdown. Edit the input to replace the example with your own string.

Identification

AI 01: Global Trade Item Number

The primary product identifier, 14 digits with a GS1 mod-10 check digit. Shorter GTINs (8/12/13) are padded with leading zeros.

Value
09506000134352
Format
Numeric, exactly 14 characters
Example
09506000134352

Segment colours match the category palette used in the parser's breakdown cards.

Fixed and variable length, and why FNC1 exists

A scanner knows where one AI ends and the next begins from the AI itself. Fixed-length AIs, the ones where the General Specifications set an exact length, need no separator. AI (01) is always 14 digits and AI (17) is always 6. As soon as the parser reads the code, it knows how many characters to take.

Variable-length AIs are the problem. AI (10) batch can be anywhere from 1 to 20 characters. When it sits in the middle of a string, the parser cannot tell where the batch number stops and the next AI starts. GS1 solves this with the FNC1 function character (ASCII 29), which is invisible on the printed label but part of the barcode. The GS1 General Specifications require an FNC1 after a variable-length AI that is not the last one in the string. The parser accepts both the raw FNC1 byte and the ]C1 symbology identifier that some scanners send as a prefix.

Where GS1-128 is printed

GS1-128 is used wherever one item has to carry more than a GTIN: a batch, a date, a weight, a destination. It is a trade and logistics barcode, read at the warehouse and the goods-in dock, not at the shop till.

Pallet and carton labels

Pallets shipped between trading partners carry an SSCC label, and the SSCC itself is AI (00). The same label often carries a GTIN-14, a batch, a best-before date and the GLN of the destination. Anyone who receives goods at a warehouse dock scans these labels.

Big retailers add their own rules to that label. RetailerHub's guide to GS1-128 shipping labels lists what Walmart, Target, Amazon, Home Depot and Kroger each want on it. If you print SSCC labels from your own reports, i-net software's FAQ How can I print a SSCC with GS1-128 barcode? shows a report function that builds the SSCC and its check digit.

Pharmaceutical serialisation

Under the EU Falsified Medicines Directive and the US DSCSA, every prescription drug pack carries a 2D Data Matrix encoding (01) GTIN, (17) expiry, (10) batch and (21) serial. In the EU a pharmacy scans it to check the pack against the medicines verification system before handing it over. Paste the string from one of those codes here and the parser lists all four AIs.

Fresh food sold by weight

Cases of meat, cheese and fish that vary in weight carry a GTIN, a net weight in the 310x range and usually a sell-by date (16) or a best-before date (15). A case may also carry a count of the items inside in AI (30). The receiving system takes the weight from the label instead of weighing the case again.

Fishery and food traceability

Seafood can carry a group of traceability AIs in the 7xxx range: (7005) catch area, (7006) first freeze date, (7008) species and (7009) fishing gear type. They put the catch details on the same label as the GTIN and the batch. Paste a seafood label and the parser decodes each one.

What the parser catches, and what it does not

A well-formed GS1-128 can be read only one way, but printed labels and exported data are often damaged or wrong. The parser flags four kinds of error.

The parser cannot check whether the data is true. If your GTIN is valid but points at the wrong product, the parser has no way to know. To check against a product master, use the output of this parser as input to your PIM or ERP. To check or complete a GTIN on its own before it goes on a label, use the check digit calculator.

Frequently asked questions

What is the difference between GS1-128 and an Application Identifier?

GS1-128 is the barcode: the bars and spaces, built on Code 128. Application Identifiers are the data inside it, codes of two to four digits that say what follows, such as a GTIN, a batch, an expiry date or a weight. A GS1-128 label is a chain of AIs and their values printed in Code 128. The same AIs are used in GS1 DataMatrix and in GS1 Digital Link URLs, so the parser accepts all of those carriers.

What does the ]C1 at the start of a scanner output mean?

It is the symbology identifier for Code 128 with FNC1 in the first position, which is what a GS1-128 is. Your scanner adds it so the receiving software knows the string carries GS1 data and is not a plain Code 128 barcode. The parser removes it and starts reading at the first AI. If your scanner is set to suppress symbology identifiers you will not see it, and the parser works the same way without it.

Why are some AIs fixed-length and others variable-length?

Fixed-length AIs like (01) GTIN, (17) expiration date or (3103) net weight always take exactly the same number of digits after the code. Variable-length AIs like (10) batch, (21) serial or (8200) extended packaging URL have a maximum length, and they end with an FNC1 character (ASCII 29) or at the end of the string. This matters when you decode a raw scan: without the FNC1, a variable-length batch runs into the digits of the next AI and the values come out wrong.

Can I scan a GS1-128 with my phone camera?

Not reliably. Phone cameras are built to read 2D symbols such as QR codes and Data Matrix, and while some reader apps can decode Code 128, the camera app on most phones does not. If shoppers or field staff need to scan the data with a phone, print it as a GS1 Digital Link URL in a QR code: the same AI data, written as a web address the camera opens directly. The parser gives you that URL for every input as one of its three export formats.

How do I know which AIs are in a barcode without scanning it?

Read the text under the bars. A GS1-128 label prints the same data in human-readable form, with each AI in brackets: (01)09506000134352(17)271231(10)ABC123. Type or paste that into the parser and you get the full breakdown. The parser also accepts the raw scanner output, without brackets and with FNC1 separators, so you can point a hand scanner at the input field and the text arrives intact.

Is (01) the same as EAN-13?

No. AI (01) holds a GTIN-14, always 14 digits. EAN-13 is the classic retail barcode: 13 digits. When an EAN-13 number goes into AI (01) inside a GS1-128, it gets a leading zero to make 14 digits, so the EAN-13 9506000134352 becomes (01)09506000134352. The parser does this for you: the GTIN shown in the breakdown is always the 14-digit form.

Does this tool validate check digits inside AI values?

Yes, for the AIs that carry one. GTIN in (01) and (02) is checked with the GS1 mod-10 algorithm, the SSCC in (00) on its 18 digits, and the GLNs in (410) to (417) on their 13 digits. A wrong check digit shows in the breakdown card as a red error with the expected digit and the digit you entered. Other AIs get length and character-set checks only.

Are the brackets around the AI numbers part of the barcode?

No. The brackets appear only in the text printed under the bars, so a person can see where each AI starts. The bars hold the AI digits and values without them, with an FNC1 at the start and after any variable-length value that is not last. If label software draws the brackets into the bars, a scanner reads them as data and the label fails. The parser accepts both forms, and the Data Matrix generator takes the bracketed text and leaves the brackets out of the code.

How do I split a GS1-128 scan into separate fields?

Paste the scan into the parser and each AI gets its own card with its value and a Copy button. Cutting the string at fixed positions breaks as soon as a supplier adds or drops an AI. The parser looks up each AI instead: a fixed-length value takes its set number of characters, and a variable-length one ends at the FNC1 separator or at the end of the string. For a whole column of scans, the bulk parser gives one table column per AI.

Can I paste label data from a live production run?

Yes. The parser runs in your browser and sends no API call or analytics payload with your input, so batch numbers, serials and the GLNs of your customers stay on your computer. The QR code of the Digital Link form is drawn in the browser too. Your own company rules on pasting internal data into web pages still apply, but this page does not send the data anywhere.

By The eancheck teamPublished Updated

Questions or corrections? Email the eancheck team.