IDAutomation.com, Inc. IDAutomation.com, Inc.
GS1-128

GS1-128 Barcodes in Java

Create GS1-128 shipping labels and trade item barcodes with Code 128 and application identifiers from Java.

How it works

GS1-128 is built on Code 128 and encodes GS1 data structures such as SSCC-18 and SCC-14. Each symbol starts with a Start C character, then FNC1, then an application identifier whose data forms an element string.

  • Common AIs: (00) SSCC, (01) GTIN, (10) batch or lot, (21) serial number, (8100) and (8101) coupon codes
  • FNC1 can be entered as ~202 with ApplyTilde, as ASCII 202, or by using (01) with parentheses; variable-length strings go last and are separated by FNC1
  • A MOD 10 check digit is often required: with ApplyTilde enabled, ~m followed by the count of preceding characters computes it
  • The Java Code 128 class supports auto mode and GS1-128 AI detection
GS1-128 barcode with application identifier labels for GTIN, batch or lot, serial number and SSCC, and the symbol structure

In Java

Parenthesized application identifiers work in Code 128, and tilde codes give explicit control of FNC1 and check characters.

BarCode bc = new BarCode();
bc.setDataToEncode("(01)09521101530001(10)ABC123");
// parenthesized AIs are accepted in Code 128;
// ~202 can be used for FNC1 when ProcessTilde is true

Frequently asked questions

What is GS1-128?

A barcode standard built on Code 128, formerly known as UCC-128 or EAN-128, used for shipping labels, trade items and coupons.

How tall should the symbol be?

Height is 15% of the symbol length or 0.50 inch (1.3 cm), whichever is greater, according to BarcodeFAQ. For 10 to 16 mil X dimensions use 0.50 inch; for 16 to 40 mil use 1.25 inches.

Where can I verify the data?

The Barcode Data Decoder Verifier App at IDAutomation parses the element strings.

Learn more at BarcodeFAQ.com

The Internet Barcode FAQ explains GS1-128 in depth.

BARCODEFAQ