GS1-128 barcode generator

The carton and pallet label barcode. Write your Application Identifiers in parentheses, as the standard prints them, and the symbol is built with the function character that tells a reader the content is structured GS1 data rather than free text.

What an Application Identifier does

A GS1-128 does not carry one value, it carries labeled fields. An AI is a short numeric prefix declaring what the next run of characters means, so a reader knows where each field starts and how to interpret it without any agreement between you and the recipient beyond the standard itself.

The common ones on a carton: (01) is the GTIN of what is inside, (17) an expiration date as six digits, (10) a batch or lot code, (21) a serial number, (37) a count. A single symbol carrying (01), (17) and (10) tells a receiving system what the product is, when it expires and which batch it came from.

The parentheses are printing, not data

You type them and the standard prints them under the bars, but they are not in the symbol. What the symbol actually carries is the digits, with FNC1 in the first position marking the whole thing as GS1 data, and further FNC1 characters separating any field whose length is not fixed.

This has a consequence that looks like a bug the first time you meet it. Encode (01)09521234543213 and a decoder may hand back the string with the parentheses restored. It has not read them from the image; it recognized the FNC1, parsed the AI table, and re-inserted them for display. Getting brackets back is positive evidence the decoder understood your symbol as GS1.

Fixed length fields and the separator

Some AIs have a length fixed by the standard. A GTIN under (01) is always fourteen digits, a date under (17) always six, so a reader consumes exactly that many and starts looking for the next AI. Nothing needs to mark the end.

Others are variable, and a batch code under (10) can be anything up to twenty characters. When one of those is followed by another field, a separator FNC1 has to go between them, and leaving it out is the most common way a hand-assembled GS1 barcode ends up unparseable. The encoder places them for you from the AI table.

GS1-128 or GS1 Data Matrix

The same data, the same AIs, and a different shape. GS1-128 is linear, gets wider with every field, and is what a warehouse scanner expects on a carton. GS1 Data Matrix is a small square that holds far more, and it is what healthcare and pharmaceutical marking has moved to, because a syringe has no room for a linear symbol.

Both are on this site and both take the same bracketed input, so the same test data can be put through either.

Questions

Should I type the parentheses?

Yes, here. They are how the standard prints AIs and how people read them, so this page takes them as input. They are not encoded into the symbol; the FNC1 character and the AI table do that work.

Why does my decoder return brackets I did not encode?

Because it parsed the GS1 structure. It saw FNC1, looked up the AIs, and re-inserted the brackets for display. That is a decoder doing more than reading characters, and it is evidence the symbol is well formed.

What is the difference between GS1-128 and plain Code 128?

The FNC1 in the first position and the convention that follows it. The bar patterns come from the same symbology, so the same scanners read both; only GS1-128 announces that its content is structured, labeled fields.

Is this the same as an SSCC label?

An SSCC is one AI, (00), carrying an eighteen digit pallet serial number, and it is usually printed as a GS1-128. So a GS1-128 is the barcode and the SSCC is one of the things it can carry.

Generate a GS1-128 →

More barcode generators

ITF-14 barcode generator · Data Matrix generator · Aztec code generator · PDF417 generator · Pharmaceutical barcode generator · Test barcode numbers · Barcode generator · QR code generator

Open the generator → · All formats