GS1-128 Barcode Generator API
Supply chain standard with Application Identifiers
Sample GS1-128 barcode
Generated live by the BarGen API from (01)09521234543213(10)LOT42
GS1-128, formerly known as UCC/EAN-128, is a Code 128 subset that uses Application Identifiers (AIs) to encode multiple structured data fields, such as GTIN, batch or lot number, expiration date, and serial number, within a single barcode. Each field is prefixed by a numeric AI in parentheses that defines its meaning and length, allowing one symbol to carry logistics and traceability data that older formats could not combine. It is the primary symbology for GS1 supply chain and traceability standards worldwide.
BarGen accepts GS1-128 data as a string of Application Identifiers and values, for example (01) for GTIN followed by (10) for batch number, with format set to gs1-128; the API inserts the required FNC1 function character automatically between variable-length fields. Output is delivered as SVG for label production or PNG for previews, matching GS1 minimum quiet zone requirements.
GS1-128, formerly known as UCC/EAN-128, is a barcode standard based on Code 128 that uses Application Identifiers (AIs) to encode supply chain data. It is the global standard for logistics, healthcare, and retail distribution.
Application Identifiers are standardized prefixes that define the type and format of the data that follows. Common AIs include (01) for GTIN, (10) for batch/lot number, (17) for expiration date, (21) for serial number, and many more.
The barcode uses an FNC1 character after the start code to indicate GS1-128 format. Variable-length data fields are separated by FNC1 characters, while fixed-length fields use their defined length. This enables multiple data elements in a single barcode.
GS1-128 is mandatory for shipping labels in many industries. It enables full traceability from manufacturer to point of sale, supports pharmaceutical serialization, food safety tracking, and is required for compliance with regulations like the FDA Drug Supply Chain Security Act (DSCSA).
Common use cases
Food traceability and lot tracking
Food and beverage producers encode GTIN, batch number, and expiration date together in one GS1-128 symbol to support recall traceability across the supply chain.
Pharmaceutical serialization
Pharmaceutical distributors use GS1-128 to combine product code, lot number, and expiry date on secondary packaging and shipping cases for regulatory track-and-trace compliance.
Logistics labels (GS1-128 shipping labels)
Standard GS1 logistics labels place SSCC, GTIN, and quantity Application Identifiers in a GS1-128 barcode so carriers can scan a single code for full shipment data.
Generate GS1-128 via the REST API
curl "https://api.bargen.pro/v1/barcode/gs1-128?data=%2801%2909521234543213%2810%29LOT42&format=svg" \
-H "X-API-Key: YOUR_API_KEY"
Returns the barcode as SVG; PNG, PDF and EPS are available on higher plans. See the API documentation for all options.
Frequently asked questions
What is the difference between GS1-128 and plain Code 128?
GS1-128 is Code 128 with a reserved FNC1 start character and a structured Application Identifier syntax defined by GS1, while plain Code 128 encodes arbitrary text with no predefined data structure. GS1-128 barcodes are not valid without following the AI format rules.
What do the numbers in parentheses mean?
Each parenthesized number is a GS1 Application Identifier that defines the field that follows, for example (01) means GTIN and (17) means expiration date. The parentheses are a human-readable convention and are not encoded literally in the barcode itself.
Can one GS1-128 barcode hold multiple data fields?
Yes, that is its main purpose. A single GS1-128 symbol commonly combines several Application Identifiers, such as GTIN, batch number, and expiration date, into one scannable code instead of requiring separate barcodes for each field.
Start generating GS1-128 barcodes
Free tier with 1,000 API calls per month. No credit card required.