Skip to content

GS1 Application Identifier Standard Format

Terry Burton edited this page Aug 18, 2025 · 29 revisions

GS1 Application Identifier Standard Format

Certain barcode symbologies (including GS1-128, GS1 DataBar Expanded, GS1 DataMatrix, GS1 QR Code and GS1 Composite Symbols) represent standardized GS1 data and require that their data field is provided in GS1 Application Identifier standard format, consisting of a concatenated string of AIs along with their corresponding values.

The AIs are a set of approximately one hundred two-, three- or four-digit prefixes written within parentheses that represent physical attributes and business information, e.g.

  • (00) is an eighteen-digit SSCC.
  • (01) is a fourteen-digit GTIN.
  • (403) is a variable-length routing code.

The following input represents GTIN-14 09521234543213; Expiration Date 1 January 2010; Batch 123ABC; Serial 1234567890:

(01)09521234543213(17)100101(10)123ABC(21)1234567890

Encoders for barcode symbologies that expect data in GS1 Application Identifier standard format will take care of parsing the input and inserting any necessary FNC1 characters to delimit variable length fields.

Input to GS1-based encoder:   (01)09521234543213(17)100101(10)123ABC(21)1234567890
                                                     |
                                     [ BWIPP encodes barcode message... ]
                                                     |
                                                     V
Barcode contents:             {FNC1}095212345432131710010110123ABC{FNC1}211234567890
                                                     |
                                    [ Scanner transfer protocol sends... ]
                                                     |
                                                     V
Application receives:          ]Nm095212345432131710010110123ABC{GS}211234567890

(Where "]Nm" is the symbology specific AIM Symbology Identifier.)

Encoding parentheses within Application Identifier data values

Instances of parentheses, ( and ), within Application Identifier data values must be escaped using the parse option as ^040 and ^041, respectively.

GS1 Application Identifier Linting

The input is checked against the structural rules for the GS1 Application Identifiers, as described in this article, unless the dontlint option is given. The Application Identifier definitions are provided in the GS1 General Specifications.

Use of Group Separator character (GS; ASCII 29) as an AI separator

FNC1 is the the canonical separator that is used in GS1 symbols when encoding Application Identifier based data.

The transfer protocol for FNC1 characters is defined by the fundamental ISO/IEC barcode symbology standards and is not something that an application standard can legitimately redefine whilst claiming conformance with the fundamental standards.

Encoding a GS (ASCII value 29) directly within a barcode message is incorrect and may lead to larger symbol sizes since they may not be encoded as efficiently and FNC1. However, because the transfer protocol for barcode scanners converts FNC1 non-data characters in third and subsequent characters positions to GS data characters for transmission, the host is generally unable to determine whether FNC1 or GS was used in the barcode message.

Because of this ambiguity, the use of GS characters of AI separation is tolerated by the GS1 standards, but not encouraged.

BWIPP will always correctly encode the barcode message using FNC1 characters.

If you wish to do the wrong thing then you can manually encode the data and use a general (non-GS1) instance of the encoder, for example:

Instead of auto-encoding with canonical use of FNC1 separators:

Encoder:   GS1 DataMatrix
Data:      (01)09521234543213(17)100101(10)123ABC(21)1234567890
Options:

Manually encode with the non-canonical use of GS separators:

Encoder:   Data Matrix
Data:      ^FNC1095212345432131710010110123ABC^GS211234567890
Options:   parse parsefnc

Note however that:

  • The rules for encoding Application Identifier based data are nuanced. FNC1/GS separators are not merely separators and their necessity is unrelated to whether the AIs are fixed or variable length, as many sources falsely claim.
  • You will not benefit from BWIPP's comprehensive validation of AI-based data if you choose to encode data manually rather than let BWIPP take care of it.

Symbologies Reference

Point of Sale

GS1 DataBar

Supply Chain

Two-dimensional Symbols

One-dimensional Symbols

Postal Symbols

Pharmaceutical Symbols

Less-used Symbols

GS1 Composite Symbols

Raw Symbols

Partial Symbols

Clone this wiki locally