Back to guides

GS1 Barcodes Explained: GS1-128, DataBar & EAN-128

A practical guide to GS1 barcodes: how GS1-128, EAN-128 and GS1 DataBar differ, how application identifiers work, check digits, and which format to use.

Quick answer

"GS1 barcode" is an umbrella term, not one symbology. The three you will meet most often are GS1-128 (the linear barcode used on shipping and logistics labels), EAN-128 (the older name for the same GS1-128 data structure), and GS1 DataBar (a family of newer, smaller symbols for retail coupons and fresh-food labels). They can carry the same GS1 data, but they look different and scanners treat them differently.

A GS1 barcode generator does two jobs: it turns your GS1 application identifiers and values into a scannable image, and it calculates the check digit. It does not issue a GS1 company prefix — that comes from your local GS1 organisation.

GS1-128 vs EAN-128 vs GS1 DataBar

  • GS1-128 is a Code 128 symbology that begins with a FNC1 character and encodes data as pairs of application identifiers (AI) and values. It is the standard for cartons, pallets and shipping containers.
  • EAN-128 is the former name of GS1-128. The specification was renamed in 2006; if a form or carrier still says "EAN-128", they want a GS1-128 barcode. The output is identical.
  • GS1 DataBar is a family of linear and stacked 2D symbols (Omnidirectional, Limited, Expanded, Stacked) designed for small items, coupons and produce. It carries less data than GS1-128 but scans at much smaller sizes.

If you are labelling a carton or pallet, use GS1-128. If you are labelling a single small retail item with a variable-weight or coupon value, look at the GS1 DataBar formats: DataBar Omnidirectional, DataBar Expanded and DataBar Stacked.

How application identifiers work

A GS1 barcode is not just a number. It is a sequence of application identifiers, each with a fixed meaning and a fixed value length. The scanner reads the AI first, so it knows what the following digits represent without any lookup table.

  • (01) — GTIN, 14 digits, identifies the trade item.
  • (10) — batch or lot number, up to 20 alphanumeric characters.
  • (11) — production date, six digits in YYMMDD form.
  • (17) — expiry date, six digits in YYMMDD form.
  • (21) — serial number, up to 20 alphanumeric characters.
  • (37) — quantity, up to eight digits.

A shipment label might encode (01)09501234567895(11)260930(10)ABC123. The FNC1 separator tells the scanner where a variable-length value ends, so the next AI can be read correctly. When you generate the image, enter the AI and value pairs in the order your trading partner requires — the order is part of the label specification.

Check digits and why they matter

GTIN-based GS1 identifiers include a modulus-10 check digit. The final digit is calculated from the others so a single mistyped digit produces a value that fails validation. A good GS1 barcode generator computes this digit for you; typing it by hand is a common source of labels that scan but are rejected by the receiving system.

For GS1-128 the Code 128 symbol also has its own Mod 103 check character, calculated automatically by the encoder. These are two separate checks at two different layers — the GTIN check digit validates the data, the Mod 103 character validates the printed symbol.

Which GS1 format should you use?

  • Cartons, pallets and logistics labels → GS1-128 with AI (01) GTIN plus batch, date and serial as required.
  • Retail sellable units → an EAN-13 or UPC-A barcode image from a GS1-issued number, not a made-up value.
  • Coupons, fresh produce, small variable-weight items → GS1 DataBar Omnidirectional or Expanded.
  • Serial shipping containers → SSCC-18, which is a GS1-128 carrying AI (00). See the SSCC-18 guide.

Common GS1 barcode mistakes

Do not invent a GS1 company prefix. A number that looks like a GTIN is not a valid GS1 identifier unless the prefix was allocated to your organisation.

Do not confuse the identifier with the image. Generating a barcode from a random 13-digit value creates a symbol, not an official product code.

Do not drop the FNC1 separator in variable-length fields. Without it, (10)ABC123(11)260930 is read as one value and the batch and date merge.

Do not print below 300 DPI or shrink the symbol past its quiet zone. A GS1 label that scans on screen often fails on a thermal printer if the bars are compressed.

Generate and verify

Our GS1-128 generator accepts the AI values directly and outputs print-ready PNG or SVG. For other formats, start from the barcode type guide, then verify the printed label with the barcode scanner before you run the full batch.

Related reading


Enjoyed this guide? ☕

If this guide saved you time, consider supporting the project — it helps keep the barcode generator free for everyone.

☕ Support on Ko-fi