codigo-qr.es

§BARCODE / GS1-128

GS1-128 generator for logistics and pharmaceutical traceability

GS1-128 is Code 128 with Application Identifiers that encode batch, expiration, weight and GTIN in a single barcode. Standard for pharmacy traceability, food with expiration and logistics with variable weight. Pro plan.

  • GS1-128 standard
  • Live preview
  • Scans on any reader

GS1-128 is a Pro format

Create a free account and upgrade to Pro to generate this format and the other advanced ones (UPC-A, UPC-E, Code 39, ITF-14, GS1-128). Pro also includes unlimited dynamic QR codes, full analytics and a center logo.

  • All advanced formats
  • Unlimited dynamic QR codes
  • No watermark

§WHAT IS

What is GS1-128 and what are Application Identifiers?

GS1-128 is Code 128 with a protocol on top: each data block is preceded by a numeric code called Application Identifier that indicates what type of data follows and in what format.

Structure of a typical GS1-128 for pharmaceutical packaging: (01)05012345678900(17)260301(10)ABC123 - AI 01 = product GTIN-14 (14 digits) - AI 17 = expiration date in YYMMDD format - AI 10 = batch number (alphanumeric, variable length) The reader recognizes the AIs and separates fields automatically. The receiving system knows that (17)260301 means expiration on March 1, 2026 without client-specific configuration: the YYMMDD format behind AI 17 is GS1 worldwide standardized. The whole string prints as a single barcode similar in appearance to standard Code 128, but with a special control character at start (FNC1) identifying the format as GS1. GS1 maintains a catalog with more than 200 Application Identifiers for all kinds of data. The most used: - AI 00: SSCC, 18-digit shipment unit code (pallets, containers). - AI 01: product GTIN-14. - AI 10: batch number. - AI 11: manufacturing date. - AI 17: expiration date. - AI 21: unique serial number per unit. - AI 30: number of units. - AI 310 to 369: weight, volume, dimensions (multiple variants by units). - AI 400: customer order number. Fixed-length AIs (such as 01, 17, 11) don't need a separator. Variable-length AIs (such as 10, 21, 400) require an FNC1 separator at the end of the field if followed by another AI.

§WHEN TO USE

When do you need GS1-128 and not standard Code 128?

When your logistics requires transmitting structured data with the code (GTIN, batch, expiration, variable weight) and the systems that will scan it expect GS1 format with Application Identifiers.

GS1-128 is mandatory or strongly recommended in these scenarios: - Pharmaceutical traceability: Spanish Royal Decree 686/2013 and the European Falsified Medicines Directive (FMD) require serialization with AI 01 (GTIN), AI 17 (expiration), AI 10 (batch) and AI 21 (unique serial number) on secondary medicine packaging. - Food with strict expiration: fresh meats, fish, perishable dairy products. Retailers demand GS1-128 with AI 17 for automatic shelf removal management. - Variable-weight logistics: fruits, bulk vegetables packaged in supermarkets, manually-cut meat products where final weight is not constant. AI 310x encodes variable weight directly in the code. - Supply chain with batch traceability: any product where tracking from manufacture to final sale is necessary, typically under HACCP, IFS or BRCGS certification. - Pallet logistics with SSCC: AI 00 encodes a unique 18-digit SSCC per pallet, allowing individual tracking in warehouse and transport. Outside those cases, plain Code 128 is enough and simpler. If you only need an internal alphanumeric identifier without structure, don't add the complexity of GS1-128. Don't use GS1-128 for unit product at supermarket POS: that's EAN-13 or UPC-A. GS1-128 is for transport packaging (master cartons, pallets) and for pharmaceutical secondary packaging with serialization.

§SPECS

GS1-128 technical specifications

Length

1-80

Characters

Alphanumeric

Example

(01)05012345678900(17)260301(10)ABC123

Check digit

No

GS1-128 is standardized by GS1 General Specifications, based on the ISO/IEC 15417 standard (Code 128): - Structure: FNC1 prefix (special Code 128 character with value 102 in subset B) followed by AI plus data pairs. - Maximum recommended length: 48 characters including the AIs. Readers accept more, but beyond that legibility drops. - Character set: full ASCII (128 characters) within each data field. - Check digit: modulo 103 over the entire code, calculated automatically. - Separator: FNC1 is also used between variable-length AIs and the next AI. Fixed-length AIs don't require separator. - Dimensions: recommended X factor between 0.495 mm and 0.940 mm for printing on adhesive label. - Quiet zone: 10X on left and right, mandatory. - Compatibility: any Code 128 reader reads the full string. Systems that understand GS1 process the AIs and separate fields. Systems that don't understand GS1 receive the full string as plain text.

§COMPARISON

How does GS1-128 differ from Code 128 and GS1 DataMatrix?

Code 128 transmits a string. GS1-128 transmits a structured string with fields identified by Application Identifiers. GS1 DataMatrix encodes the same information in 2D format for very small packaging.

GS1-128 vs Code 128: if you'll save the code in a database as plain text without structure, Code 128 is enough. If you'll process individual fields (batch, expiration, weight), GS1-128 saves you parsing strings with regular expressions: each AI delimits a field in a standard way and the receiving system knows exactly what data type to expect. The visible difference when printing is only the FNC1 character at start (invisible in the human text) and the parentheses around the AIs in the rotated label. GS1-128 vs GS1 DataMatrix: GS1 DataMatrix is the 2D version of the GS1 standard, used when packaging is too small for a long linear label. The European pharmaceutical industry is gradually migrating from GS1-128 to GS1 DataMatrix because the 2D code occupies a fraction of the space. For pharmaceutical secondary packaging, GS1 DataMatrix is now the standard. For master cartons and pallets, GS1-128 still dominates. GS1-128 vs SSCC inside GS1-128: SSCC (Serial Shipping Container Code) is AI 00 inside GS1-128 format. It identifies a unique shipment unit (pallet, container) with 18 digits.

§FAQ

Frequently asked questions about GS1-128

  • Q.01

    Can I use GS1-128 without being registered with GS1?

    Technically you can generate the code and scan it. But the GTIN inside AI 01 must be valid and unique in the market, which requires GS1 registration. If you use it internally without public GTIN, you can invent GTINs for internal use but you'll lose interoperability with external systems. If you'll deliver merchandise to retailers, distributors or pharmacies, the GTIN must be registered to your name in GS1 GEPIR.

  • Q.02

    How do I enter the AIs in this generator?

    Paste the full string with AIs in parentheses: (01)05012345678900(17)260301(10)ABC123. The parentheses are human-readable and print in the rotated text below the code, but the reader ignores them when decoding.

  • Q.03

    What are the most common Application Identifiers in practice?

    AI 01 (product GTIN, 14 digits), AI 10 (alphanumeric batch), AI 17 (expiration YYMMDD), AI 21 (unique alphanumeric serial number), AI 00 (SSCC for pallets, 18 digits), AI 310x (net weight in kg with x decimals). In European pharma under FMD, AI 01 + AI 17 + AI 10 + AI 21 are required simultaneously.

  • Q.04

    Does GS1-128 work with any reader?

    Any Code 128 reader reads the full string. Systems that understand GS1 process the AIs and separate fields automatically. Systems that don't understand GS1 receive the string as plain text and must parse the AIs by application code. Most modern ERP software (SAP, Microsoft Dynamics, Sage) has native GS1 modules.

  • Q.05

    Is GS1-128 the same as Code 128 with parentheses?

    No. The technical difference is the FNC1 character at the start of the code, invisible in the human text. If you print Code 128 with parentheses simulating GS1, GS1 readers won't process the AIs because the initial FNC1 identifying the format as GS1 is missing. Adding parentheses to standard Code 128 doesn't convert the code into GS1-128.

Ready to create your GS1-128 code

Unlock this format by upgrading to Pro. Cancel any time from your dashboard.

Upgrade to Pro