GS1 Application Identifiers 01, 17, 10, 21 and 90–99 in plain words
A GS1 code is a set of fields, each starting with a short number — the Application Identifier (AI). The AI says what follows: the product number, an expiry date, a batch, a serial number. A handful of AIs covers most codes on packs — 01, 17, 10 and 21 — plus the internal range 90–99 that national marking systems use for their own data.
The common AIs
| AI | What it is | Length | GS after the field |
|---|---|---|---|
| 01 | GTIN — the product number | 14 digits, fixed | Not needed |
| 17 | Expiry date, YYMMDD | 6 digits, fixed | Not needed |
| 11 | Production date, YYMMDD | 6 digits, fixed | Not needed |
| 10 | Batch or lot number | Up to 20 characters | Needed if another field follows |
| 21 | Serial number of the pack | Up to 20 characters | Needed if another field follows |
| 3103 | Net weight in kg, three decimals | 6 digits, fixed | Not needed |
| 90–99 | Internal data defined by the company or system using the code | Up to 30 (90) or 90 (91–99) characters | Needed if another field follows |
Why some fields need a separator and others do not is covered in the article on the GS separator and FNC1.
01 — which product
The GTIN identifies the trade item and is the same on every pack of one product. In a GS1 DataMatrix it is always 14 digits: a familiar 13-digit EAN-13 is padded with a leading zero. The last digit is a check digit computed with the GS1 modulo-10 algorithm, so a typo can be caught without any network lookup.
17 and 11 — dates
Dates are six digits, year–month–day. One detail trips up parsers: day 00 is allowed and means the last day of that month — 17 271100 is “expires end of November 2027”, not an invalid date.
10 and 21 — which batch, which pack
The batch number groups packs made together; the serial number makes each pack unique. The pair “GTIN + serial number” never repeats — that is what serialisation systems such as the EU pharmaceutical repository or national marking systems track from factory to sale.
Both fields may contain digits, upper- and lower-case Latin letters and some punctuation, so compare them case-sensitively and never “normalise” them.
90–99 — internal fields and verification codes
For GS1, AIs 90–99 are internal: their meaning is defined not by GS1 but by the company or the system that uses the code. General-purpose GS1 parsers therefore show them as “company internal information”, and field lengths have to come from that system's specification.
National marking systems use this range for cryptographic verification data. The Russian Chestny ZNAK system is a good example:
- 91 + 92 — a 4-character key identifier and a 44-character verification code. Together they let a checkout verify the code offline, at the cost of size: a medicine code with these fields is 83 characters without separators.
- 93 — a 4-character short verification code used instead of 91 + 92 on small packs. The code becomes two to three times shorter, but can only be verified online.
| Long: 01 + 21 + 91 + 92 | Short: 01 + 21 + 93 | |
|---|---|---|
| Length (serial number 6 / 13 characters) | 76 / 83 characters | 30 / 37 characters |
| DataMatrix size with ASCII encoding | 36×36 modules | 20×20 or 22×22 modules |
| Verification at checkout | Offline and online | Online only |
| GS separators | After 21 and after 91 | After 21 |
Source: how a medicine code is formed, on the operator's site (markirovka.ru, in Russian).
Verification data: print it exactly as issued
Verification fields are not computed at the factory. The marking operator issues each code as a complete string, and nobody can recalculate the verification part without the operator's keys. So the main rule is to print the code exactly as received. On production lines it is most often damaged in three ways:
- Truncated. A database field, a spreadsheet column or a label template variable is shorter than the code string, and the last characters are lost.
- Characters altered. Verification codes contain
+,/and=, and every field may mix letter case. Re-encoding, escaping in CSV or XML, “fixing” the case and autocorrect all break them. - GS lost before it. Without the separator after the serial number a checkout cannot find where the next field starts.
Offline on the line you can check the form: field lengths, separators, and that the printed string matches the one issued for this job. Authenticity and status are checked only by the operator.
Other AIs you will meet
Codes may carry further fields after the ones above — for example a net weight in AI 3103 on dairy or meat. A parser should accept such fields calmly rather than reject the code as malformed.
Try it
The libscanner libraries read and create GS1 DataMatrix codes with any of these fields. The Python package is pip install libscanner-dmr (Windows x64, Linux x86-64, ARM64, ARMv7); check a photo in the online scanner; sources and examples are on GitHub.
Chestny ZNAK is a trademark of CRPT LLC (ООО «Оператор-ЦРПТ»); GS1 is a trademark of GS1 AISBL. The product is not affiliated with or certified by their owners.