Written and maintained by CASRAI Editorial Board
Last updated
Short answer
A GS1-128 barcode is a Code 128 barcode whose data follows the GS1 rules: each piece of data is introduced by a numeric application identifier (AI) that tells the scanner what comes next, such as a GTIN, batch number, expiry date or serial number. It was formerly called UCC-128, and it is meant for cases, pallets and shipping units rather than retail checkout.
Definition and scope: GS1-128 versus plain Code 128
GS1 US describes GS1-128 as a subset of the Code 128 symbology that can carry up to 48 characters of information. It can hold identification keys (a GTIN, a GLN, an SSCC or a GS1 asset identifier) together with attributes such as batch or lot, serial number, expiration date and country of origin. The SSCC identifies logistic units such as cases, pallets and shipping containers.
Microsoft’s documentation for Dynamics 365 describes GS1-128 as a special case of ordinary Code 128. The difference is a flagging character, Function Code 1 (FNC1), placed as the first data character, which signals that the data must be interpreted according to the GS1 specification. A Code 128 barcode without that flag is just Code 128, and its contents are not AI-structured GS1 data.
GS1 US notes that GS1-128 is often requested on packaging beyond the item level and is not intended for point of sale, because traditional laser scanners cannot read the extra data.
How a GS1-128 barcode is read in practice
What are GS1 application identifiers?
An application identifier consists of two to four digits (GS1 Sweden). It tells the scanner what data follows, its format, its character type, its length, and whether the length is fixed or variable. For example, AI (01) means a 14-digit GTIN follows. The AIs are also printed in parentheses beneath the barcode, next to the information they describe. Examples listed by GS1 Sweden:
- 00: SSCC
- 01: GTIN; 02: GTIN of a contained item (used with 37, the number of items in the logistic unit)
- 10: batch number, up to 20 characters
- 11: production date; 13: packing date; 15: best-before date; 17: expiry date (dates in YYMMDD format)
- 21: serial number
- 310x: net weight in kilograms, where the last digit x gives the number of decimals
What does FNC1 do?
FNC1 appears in two roles. In the double start pattern it flags the symbol as GS1-128 rather than ordinary Code 128. It can also act as the separator that ends a variable-length element when another element follows; the alternative representation of that separator is the ASCII 29 group separator character.
Worked example: (01) (17) (10)
Microsoft’s documentation gives this human-readable line: (01) 09521101530001 (17) 210119 (10) AB-123. Read it left to right:
| Element | Meaning | Length rule (Microsoft) |
|---|---|---|
| (01) 09521101530001 | GTIN, 14 digits | Predefined length: 16 characters including the AI |
| (17) 210119 | Expiration date, YYMMDD: 19 January 2021 | Predefined length: 8 characters including the AI |
| (10) AB-123 | Batch number, up to 20 alphanumeric characters | Variable length |
The parentheses belong to the human-readable line beneath the symbol; they are there so a person can see where each AI starts. Order matters for the encoded data. A variable-length element that is followed by another element needs a separator (FNC1 or the ASCII 29 group separator); none is needed after the last element. Because (01) and (17) have predefined lengths and (10) can run to 20 characters, putting the batch number last avoids a separator entirely, which is the best practice Microsoft describes. Put the batch number before another element and a separator must follow it.
A second example from the same page: under AI 3102, the value 123456 means 1234.56 kg, because the last digit of 3100 to 3105 states the number of decimal places.
Related symbologies
Microsoft’s page lists the GS1 symbologies as follows. GS1 Sweden adds that GS1-128 and GS1 DataMatrix both use AIs to indicate the type of information.
| Symbology | Form |
|---|---|
| GS1-128 | Linear |
| GS1 DataBar | Linear |
| GS1 DataMatrix | 2D |
| GS1 QR Code | 2D |
| GS1 DotCode | 2D |
Where it matters for labs, clinics and receiving
A single scan of a GS1-128 label can capture several elements at once, for example batch and expiry, rather than keying them in. That makes the scanner setup part of data quality. Microsoft explains that the AIM symbology identifier ]C1 marks Code 128 with FNC1 in first position (GS1-128), whereas ]C0 marks Code 128 without it. Some scanners must be configured to add that prefix, and to convert the group separator (ASCII 29) to a printable character, so that the receiving software can split the string into the correct elements. Without the identifier, receiving software has no flag telling it the string is GS1 data rather than ordinary Code 128 text.
Which barcode applies where is a question of the use case. These CASRAI pages cover the neighbouring labelling topics:
- UDI for medical devices and UDI labeling and GUDID submission for device identification.
- ISBT 128 for blood and tissue product labelling, a separate labelling standard.
- DSCSA for the drug supply chain.
- Barcode and RFID labeling for lab sample and inventory tracking for sample and stock labelling inside the lab.
Common misunderstandings
- It is not a different barcode family. It is Code 128 with an FNC1 first character and GS1 data rules.
- It is not for retail checkout. GS1 US says it is not meant for point of sale because traditional laser scanners cannot read the extra data.
- The parentheses are not data. They appear in the human-readable line under the barcode.
- AIs are not all the same length. They have two to four digits, and each AI defines its own data format and length.
FAQ
Is GS1-128 the same as UCC-128?
GS1 US states that GS1-128 was previously called UCC-128.
Can GS1-128 hold a batch number and expiry date?
Yes. GS1 US lists batch or lot, serial number and expiration date among the attributes it can carry, along with identification keys such as the GTIN.
How much can it hold?
GS1 US says up to 48 characters of information.
Is GS1-128 used for retail checkout?
No. GS1 US says it is not intended for point of sale.
Sources
- GS1 US, GS1-128, checked 2026-10-30.
- GS1 Sweden, Application identifier guide, checked 2026-10-30.
- Microsoft Learn, GS1 bar codes (Dynamics 365 Supply Chain Management), page dated 2026-06-12, checked 2026-10-30. It summarises GS1 General Specifications release 22.0; statements attributed to Microsoft above are its description of the specification.








