About GS1-128 barcodes
Introduction
GS1-128 (formerly known as UCC/EAN-128) is a widely used standard developed for exchanging data between companies. This data can contain various information about a specific product, such as the best-before date, expiration date, batch/lot number, serial number, and so on.
With this information, you can trace where the product comes from and determine the risk profile of certain products — for example, how long a product is shelf-stable. The GS1-128 barcode can encode a maximum of 48 characters.
The meaning of the digits in a GS1-128 barcode
Before we dive deeper into the structure, we must first understand what an Application Identifier (AI) is within the context of GS1-128.
An application identifier is a numeric prefix that indicates what type of information follows in the barcode. Directly after the AI, a series of digits follows with the actual data, the length of which depends on the type of AI.
For example, if we have the GS1-128 code 3100 001400, it means that the product weighs 14 kilograms. The prefix 3100 (a GS1 standard) indicates that it concerns the weight in kilograms. The digits that follow (001400) indicate the quantity, where the length of the data field in this case is 6 digits.
Indicating decimals
Do you want to indicate decimals in the weight? Then you adjust the last digit of the prefix. This digit determines the number of decimals you need to apply to the value in the data field.
3102 001400→ the product weighs 0.14 kg (2 decimals)3106 001400→ the product weighs 0.00014 kg (6 decimals)
Below is an example of a GS1-128 barcode:

More information
For a complete overview of the different application identifiers, you can visit the official GS1 website.