Generating EAN-128 / GS1-128 Barcode
This guide explains the basic structure of data within GS1-128 (EAN-128) and also demonstrates how to create
and save barcode graphics using our Barcode Generator.
GS1-128 (EAN-128)
Understanding the GS1 Number Structure
Every GS1 number comprises one or more consecutive pairs of AIs (Application Identifiers) and data elements. AIs are numeric values that define the meaning of the associated data. In GS1-128 barcodes, AIs are always enclosed in parentheses:GS1-128 (EAN-128)
Version: 3.6
Languages: EN, DE
Size: 18 MB
Windows 11, 10, 8, 7
30-Day Trial: DOWNLOAD Alternative Source:
heise.de/...
Software License ORDER
Selection of well-known companies that use our barcode software: REFERENCES
Languages: EN, DE
Size: 18 MB
Windows 11, 10, 8, 7
30-Day Trial: DOWNLOAD Alternative Source:
heise.de/...
Software License ORDER
Selection of well-known companies that use our barcode software: REFERENCES
Entering the GS1 Number
Our barcode software allows you to input a GS1 number with or without parentheses. For instance, the number from the above example can be entered in either of these formats:
Variant 1: (01)01234567890128(15)191231
Variant 2: 010123456789012815191231
The software automatically adds any missing parentheses to correctly display the GS1 number as plain text.
Variant 2: 010123456789012815191231
Entering Variable-Length Data
In the example above, both AIs (as per the table) prescribe fixed lengths for the data elements (14 and 6 characters, respectively). In contrast, AIs with variable-length data require explicit markers to signal where one AI-data pair ends and the next one begins. This is achieved using the FNC1 special character. (Our barcode software includes a "Insert Special Character" function for this purpose.)
For example:
(30)19[*FNC1*](21)7128
Or without parentheses:
3019[*FNC1*]217128
Explanation: According to the table, AI 30 does not have a fixed data length but can vary between 1 and 8
characters. Consequently, the FNC1 character marks the end of the data element.(30)19[*FNC1*](21)7128
Or without parentheses:
3019[*FNC1*]217128
Tip: If possible, place AIs with variable-length data at the end of the GS1 number. This eliminates the need for the FNC1 separator, saving a small amount of space on the label.
Check Digit for SSCC and GTIN
AI 00 (SSCC) and AI 01 (GTIN) and AI 02 (GTIN) are the most frequently used elements within GS1 numbers. A crucial requirement is that SSCC and GTIN must each end with a check digit. If the check digit is already included within the number, our barcode software will automatically verify it. Alternatively, if you prefer, our software can calculate and insert the check digit for you. In this case, simply use a # character as a placeholder for the check digit:
(01)5326870296128#(15)191231
Table Explanations
1. In the Format column, "N" signifies numeric values, and "X" signifies alphanumeric values (along with various other characters). A double dot (..) indicates that the values can be of variable length. For example, "N..6" represents a numeric value with a maximum length of 6 characters. "N6," on the other hand, specifies a numeric value that must be exactly 6 characters long.2. AIs ending with an "x" are primarily intended for fractional values. The fractional part is encoded without a decimal point, and the position of the decimal point is represented by the "x" in the AI.
Table of All Available AIs in the GS1 System
AI | Description | Format | Required delimiter |
---|---|---|---|
00 | Serial Shipping Container Code (SSCC) | N18 | - |
01 | Global Trade Item Number (GTIN) | N14 | - |
02 | GTIN of contained trade items | N14 | - |
10 | Batch or lot number | X..20 | FNC1 |
11 | Production date (YYMMDD) | N6 | - |
12 | Due date (YYMMDD) | N6 | - |
13 | Packaging date (YYMMDD) | N6 | - |
15 | Best before date (YYMMDD) | N6 | - |
16 | Sell by date (YYMMDD) | N6 | - |
17 | Expiration date (YYMMDD) | N6 | - |
20 | Internal product variant | N2 | - |
21 | Serial number | X..20 | FNC1 |
22 | Consumer product variant | X..20 | FNC1 |
235 | Third Party Controlled, Serialised Extension of GTIN (TPX) | X..28 | FNC1 |
240 | Additional product identification assigned by the manufacturer | X..30 | FNC1 |
241 | Customer part number | X..30 | FNC1 |
242 | Made-to-Order variation number | N..6 | FNC1 |
243 | Packaging component number | X..20 | FNC1 |
250 | Secondary serial number | X..30 | FNC1 |
251 | Reference to source entity | X..30 | FNC1 |
253 | Global Document Type Identifier (GDTI) | N13+X..17 | FNC1 |
254 | GLN extension component | X..20 | FNC1 |
255 | Global Coupon Number (GCN) | N13+N..12 | FNC1 |
30 | Variable count of items (variable measure trade item) | N..8 | FNC1 |
310x | Net weight, kilograms (variable measure trade item) | N6 | - |
311x | Length or first dimension, metres (variable measure trade item) | N6 | - |
312x | Width, diameter, or second dimension, metres (variable measure trade item) | N6 | - |
313x | Depth, thickness, height, or third dimension, metres (variable measure trade item) | N6 | - |
314x | Area, square metres (variable measure trade item) | N6 | - |
315x | Net volume, litres (variable measure trade item) | N6 | - |
316x | Net volume, cubic metres (variable measure trade item) | N6 | - |
320x | Net weight, pounds (variable measure trade item) | N6 | - |
321x | Length or first dimension, inches (variable measure trade item) | N6 | - |
322x | Length or first dimension, feet (variable measure trade item) | N6 | - |
323x | Length or first dimension, yards (variable measure trade item) | N6 | - |
324x | Width, diameter, or second dimension, inches (variable measure trade item) | N6 | - |
325x | Width, diameter, or second dimension, feet (variable measure trade item) | N6 | - |
326x | Width, diameter, or second dimension, yards (variable measure trade item) | N6 | - |
327x | Depth, thickness, height, or third dimension, inches (variable measure trade item) | N6 | - |
328x | Depth, thickness, height, or third dimension, feet (variable measure trade item) | N6 | - |
329x | Depth, thickness, height, or third dimension, yards (variable measure trade item) | N6 | - |
330x | Logistic weight, kilograms | N6 | - |
331x | Length or first dimension, metres | N6 | - |
332x | Width, diameter, or second dimension, metres | N6 | - |
333x | Depth, thickness, height, or third dimension, metres | N6 | - |
334x | Area, square metres | N6 | - |
335x | Logistic volume, litres | N6 | - |
336x | Logistic volume, cubic metres | N6 | - |
337x | Kilograms per square metre | N6 | - |
340x | Logistic weight, pounds | N6 | - |
341x | Length or first dimension, inches | N6 | - |
342x | Length or first dimension, feet | N6 | - |
343x | Length or first dimension, yards | N6 | - |
344x | Width, diameter, or second dimension, inches | N6 | - |
345x | Width, diameter, or second dimension, feet | N6 | - |
346x | Width, diameter, or second dimension, yard | N6 | - |
347x | Depth, thickness, height, or third dimension, inches | N6 | - |
348x | Depth, thickness, height, or third dimension, feet | N6 | - |
349x | Depth, thickness, height, or third dimension, yards | N6 | - |
350x | Area, square inches (variable measure trade item) | N6 | - |
351x | Area, square feet (variable measure trade item) | N6 | - |
352x | Area, square yards (variable measure trade item) | N6 | - |
353x | Area, square inches | N6 | - |
354x | Area, square feet | N6 | - |
355x | Area, square yards | N6 | - |
356x | Net weight, troy ounces (variable measure trade item) | N6 | - |
357x | Net weight (or volume), ounces (variable measure trade item) | N6 | - |
360x | Net volume, quarts (variable measure trade item) | N6 | - |
361x | Net volume, gallons U.S. (variable measure trade item) | N6 | - |
362x | Logistic volume, quarts | N6 | - |
363x | Logistic volume, gallons U.S. | N6 | - |
364x | Net volume, cubic inches (variable measure trade item) | N6 | - |
365x | Net volume, cubic feet (variable measure trade item) | N6 | - |
366x | Net volume, cubic yards (variable measure trade item) | N6 | - |
367x | Logistic volume, cubic inches | N6 | - |
368x | Logistic volume, cubic feet | N6 | - |
369x | Logistic volume, cubic yards | N6 | - |
37 | Count of trade items or trade item pieces contained in a logistic unit | N..8 | FNC1 |
390x | Applicable amount payable or Coupon value, local currency | N..15 | FNC1 |
391x | Applicable amount payable with ISO currency code | N3+N..15 | FNC1 |
392x | Applicable amount payable, single monetary area (variable measure trade item) | N..15 | FNC1 |
393x | Applicable amount payable with ISO currency code (variable measure trade item) | N3+N..15 | FNC1 |
394x | Percentage discount of a coupon | N4 | - |
400 | Customers purchase order number | X..30 | FNC1 |
401 | Global Identification Number for Consignment (GINC) | X..30 | FNC1 |
402 | Global Shipment Identification Number (GSIN) | N17 | - |
403 | Routing code | X..30 | FNC1 |
410 | Ship to - Deliver to Global Location Number | N13 | - |
411 | Bill to - Invoice to Global Location Number | N13 | - |
412 | Purchased from Global Location Number | N13 | - |
413 | Ship for - Deliver for - Forward to Global Location Number | N13 | - |
414 | Identification of a physical location - Global Location Number | N13 | - |
415 | Global Location Number of the invoicing party | N13 | - |
416 | GLN of the production or service location | N13 | - |
417 | Party GLN | N13 | - |
420 | Ship to - Deliver to postal code within a single postal authority | X..20 | FNC1 |
421 | Ship to - Deliver to postal code with ISO country code | N3+X..9 | FNC1 |
422 | Country of origin of a trade item | N3 | - |
423 | Country of initial processing | N3+N..12 | FNC1 |
424 | Country of processing | N3 | - |
425 | Country of disassembly | N3+N..12 | FNC1 |
426 | Country covering full process chain | N3 | - |
427 | Country subdivision Of origin | X..3 | FNC1 |
7001 | NATO Stock Number (NSN) | N13 | - |
7002 | UN/ECE meat carcasses and cuts classification | X..30 | FNC1 |
7003 | Expiration date and time | N10 | - |
7004 | Active potency | N..4 | FNC1 |
7005 | Catch area | X..12 | FNC1 |
7006 | First freeze date | N6 | - |
7007 | Harvest date | N6..12 | FNC1 |
7008 | Species for fishery purposes | X..3 | FNC1 |
7009 | Fishing gear type | X..10 | FNC1 |
7010 | Production method | X..2 | FNC1 |
7020 | Refurbishment lot ID | X..20 | FNC1 |
7021 | Functional status | X..20 | FNC1 |
7022 | Revision status | X..20 | FNC1 |
7023 | Global Individual Asset Identifier (GIAI) of an assembly | X..30 | FNC1 |
703x | Number of processor with ISO Country Code | N3+X..27 | FNC1 |
7040 | GS1 UIC with Extension 1 and Importer index | N1+X3 | - |
710 | National Healthcare Reimbursement Number (NHRN) - Germany PZN | X..20 | FNC1 |
711 | National Healthcare Reimbursement Number (NHRN) - France CIP | X..20 | FNC1 |
712 | National Healthcare Reimbursement Number (NHRN) - Spain CN | X..20 | FNC1 |
713 | National Healthcare Reimbursement Number (NHRN) - Brasil DRN | X..20 | FNC1 |
714 | National Healthcare Reimbursement Number (NHRN) - Portugal AIM | X..20 | FNC1 |
723x | Certification reference | X2+X..28 | FNC1 |
7240 | Protocol ID | X..20 | FNC1 |
8001 | Roll products (width, length, core diameter, direction, splices) | N14 | - |
8002 | Cellular mobile telephone identifier | X..20 | FNC1 |
8003 | Global Returnable Asset Identifier (GRAI) | N14+X..16 | FNC1 |
8004 | Global Individual Asset Identifier (GIAI) | X..30 | FNC1 |
8005 | Price per unit of measure | N6 | - |
8006 | Identification of an individual trade item piece | N14+N2+N2 | FNC1 |
8007 | International Bank Account Number (IBAN) | X..34 | FNC1 |
8008 | Date and time of production | N8+N..4 | FNC1 |
8009 | Optically Readable Sensor Indicator | X..50 | FNC1 |
8010 | Component/Part Identifier (CPID) | Y..30 | FNC1 |
8011 | Component/Part Identifier serial number (CPID SERIAL) | N..12 | FNC1 |
8012 | Software version | X..20 | FNC1 |
8013 | Global Model Number (GMN) | X..30 | FNC1 |
8017 | Global Service Relation Number to identify the relationship between an organisation offering services and the provider of services | N18 | - |
8018 | Global Service Relation Number to identify the relationship between an organisation offering services and the recipient of services | N18 | - |
8019 | Service Relation Instance Number (SRIN) | N..10 | FNC1 |
8020 | Payment slip reference number | X..25 | FNC1 |
8026 | Identification of pieces of a trade item (ITIP) contained in a logistic unit | N14+N2+N2 | FNC1 |
8110 | Coupon code identification for use in North America | X..70 | FNC1 |
8111 | Loyalty points of a coupon | N4 | - |
8112 | Paperless coupon code identification for use in North America | X..70 | FNC1 |
8200 | Extended Packaging URL | X..70 | FNC1 |
90 | Information mutually agreed between trading partners | X..30 | FNC1 |
91 | Company internal information | X..90 | FNC1 |
92 | Company internal information | X..90 | FNC1 |
93 | Company internal information | X..90 | FNC1 |
94 | Company internal information | X..90 | FNC1 |
95 | Company internal information | X..90 | FNC1 |
96 | Company internal information | X..90 | FNC1 |
97 | Company internal information | X..90 | FNC1 |
98 | Company internal information | X..90 | FNC1 |
99 | Company internal information | X..90 | FNC1 |