Standards/gs1-datamatrix
GS1 DataMatrix
GS1 DataMatrix
Overview
GS1 DataMatrix is an application profile of the data-matrix symbology, defined and governed by the GS1 General Specifications [1]. It is not a separate symbology: it uses the ECC 200 variant of Data Matrix — the only variant GS1 permits — standardised as ISO/IEC 16022 [2], with the same square/rectangular cell grid, Reed–Solomon error correction, and L-shaped finder pattern as any other ECC 200 symbol. What distinguishes GS1 DataMatrix is a single structural rule: a FNC1 function character placed in the first position of the encoded data, flagging that the symbol carries GS1 Application Identifier (AI) element strings rather than free text [1, 3].
This is the exact same mechanism that turns a generic code-128 symbol into a gs1-128 symbol — the leading FNC1 marker plus the GS1 AI data model — but applied to a 2D matrix carrier instead of a 1D linear one [1]. The 2D form is far more compact, so it fits the GS1 AI structure (GTIN, expiry, batch, serial) onto a single small face of a consumer drug carton or product label where a linear GS1-128 symbol would not fit.
GS1 DataMatrix is the mandated data carrier for pharmaceutical and healthcare serialisation worldwide — every prescription-drug pack in the EU (under the Falsified Medicines Directive) and the United States (under the Drug Supply Chain Security Act) carries one — and is increasingly adopted in retail under GS1's "2D barcodes at retail point of sale" programme [1, 3].
History
Underlying symbology lineage [2, 3]: The base symbology, Data Matrix, was invented in 1987 (by International Data Matrix Inc.) and standardised internationally as ISO/IEC 16022 (first edition 2000, current edition 2024). The current ECC 200 variant uses Reed–Solomon error correction and is the only Data Matrix version recommended for new implementations. GS1 DataMatrix inherits all of that and adds only the GS1 data-formatting conventions on top.
GS1 profile [1]: GS1 (Global Standards One — the body formed in 2005 by the merger of the Uniform Code Council and EAN International) defines the GS1 DataMatrix profile within the GS1 General Specifications. The profile mandates ECC 200, requires the leading FNC1 marker, and constrains the encoded content to the GS1 Application Identifier registry — the same AI registry used by GS1-128 and GS1 DataBar. The technical bar/cell encoding is unchanged from ISO/IEC 16022; GS1 layers only the data semantics.
Healthcare-mandate timeline [1, data-matrix-ref, 5, 8]:
- 2011 — EU Falsified Medicines Directive (2011/62/EU) adopted, requiring a unique-identifier data carrier on prescription medicine packs.
- 2013 — US Drug Supply Chain Security Act (DSCSA) signed, phasing in product identification and serialisation for prescription drugs.
- 9 February 2019 — EU FMD safety-features rules (Delegated Regulation 2016/161) became applicable, making GS1 DataMatrix the de-facto carrier on EU/EEA prescription-drug packs.
- 2024 European Medicines Verification System (EMVS) scale — the FMD verification hub connects 2,900+ marketing-authorisation holders, 4,000+ wholesale distributors, 115,000+ commercial pharmacies and 6,000+ hospital pharmacies across Europe [8].
- DSCSA enforcement schedule (2025–2026) — staggered deadlines by trading-partner role: 27 May 2025 for manufacturers/repackagers, 27 August 2025 for wholesale distributors, 27 November 2025 for large dispensers (26+ staff), 27 November 2026 for small dispensers (≤25 staff) [8].
- Pharma track-and-trace market — estimated US$2.5 B in 2026, projected to reach US$9.7 B by 2035 at 16.1 % CAGR, with GS1 DataMatrix as the dominant carrier on the regulated-pack side [8].
Technical specification
GS1 DataMatrix is a structured-data profile of Data Matrix ECC 200 [1, 2, 3]:
| Parameter | Value |
|---|---|
| Base symbology | Data Matrix ECC 200 (ISO/IEC 16022) |
| Symbology family | 2D matrix |
| Distinguishing feature | FNC1 in the first data position |
| Data model | GS1 Application Identifiers (AIs) + element strings |
| Error correction | Reed–Solomon (ECC 200), fixed per symbol size |
| Symbol shape | Square or rectangular |
| Smallest square size | 10 × 10 cells |
| Field separator | FNC1 (function character) after variable-length AI fields |
| Symbology identifier | ]d2 (ECC 200 with leading FNC1) |
| Quiet zone | 1 module minimum on each side |
| Variable length | Yes — capacity varies with symbol size |
The FNC1 rule [1, 3]: A Data Matrix ECC 200 symbol becomes a GS1 DataMatrix symbol when the FNC1 function character is encoded in the first position. Compliant scanners report this as the symbology identifier ]d2, signalling to the receiving application that the data is GS1-formatted and must be parsed by Application Identifier rather than treated as free text. (For comparison, GS1-128 uses ]C1 for the same role on Code 128.)
Application Identifiers (AIs) [1, 6]: An AI is a numeric prefix (2–4 digits) that defines the meaning and format of the data field that follows. The AI registry is shared across all GS1 carriers. AIs commonly seen on GS1 DataMatrix in healthcare and retail include:
| AI | Meaning | Format |
|---|---|---|
| (01) | GTIN (trade item number, GTIN-14 form) | 14 digits, fixed |
| (10) | Batch / lot number | up to 20 alphanumeric, variable |
| (11) | Production date | 6 digits YYMMDD, fixed |
| (17) | Expiration / use-by date | 6 digits YYMMDD, fixed |
| (21) | Serial number | up to 20 alphanumeric, variable |
| (00) | SSCC — Serial Shipping Container Code | 18 digits, fixed |
Concatenation and the separator role of FNC1 [1, 3, 6]: A single GS1 DataMatrix symbol can carry multiple AI element strings back-to-back. Fields with a predefined fixed length (such as (01) GTIN-14 or (17) date) need no separator — the parser knows where they end. Fields of variable length (such as (10) batch or (21) serial) must be terminated by an FNC1 character when another AI follows, so the parser can find the boundary. FNC1 therefore does double duty: a flag in the first position, and a field delimiter thereafter — exactly as in GS1-128.
Worked example — the playground payload (01)09521234543213 encodes a single GTIN-14 ((01), fixed 14 digits). A typical pharmaceutical pack carries more: e.g. (01)09521234543213(17)260531(10)ABCD1234(21)12345, encoding GTIN, an expiry of 31 May 2026, batch ABCD1234, and serial 12345. The parentheses are a human-readable convention only — they are printed in any accompanying text but are not encoded in the symbol itself.
Use cases
GS1 DataMatrix is the dominant 2D carrier for structured product, healthcare, and serialisation data on small, consumer-facing surfaces [1, 3, data-matrix-ref]:
- Pharmaceutical serialisation — every prescription-drug carton sold in the EU (since the Falsified Medicines Directive safety-features rules became applicable in 2019) and the United States (under the DSCSA rollout) carries a GS1 DataMatrix encoding GTIN
(01), serial number(21), batch(10), and expiry(17). This is the single largest deployment of GS1 DataMatrix by number of physical symbols printed annually. - Medical devices and UDI — the Unique Device Identifier (UDI) regimes in the EU and US accept GS1 DataMatrix as a carrier for the UDI element strings on small device packaging.
- Retail point of sale ("2D at retail") — GS1's programme to bring 2D barcodes to retail checkout uses GS1 DataMatrix (and gs1-qr-code) so a single scan captures GTIN plus batch, expiry, and serial for fresh-food date checking, recall control, and authentication.
- Variable-measure and fresh food — date
(17)/(11)and batch(10)AIs enable shelf-life enforcement at the till and precise recall targeting. - Coupons and brand authentication — serialised GS1 DataMatrix supports anti-counterfeit and promotional use where small footprint is required.
Why GS1 DataMatrix is chosen for these contexts [1, 3]:
- It encodes the standardised AI data structure that downstream pharmacy, ERP, and traceability systems already understand.
- It fits the full serialisation data set onto a single small carton face where a 1D gs1-128 symbol would not.
- It inherits Data Matrix's high (~30 %) damage tolerance and tiny printable footprint.
- It is royalty-free, inheriting Data Matrix's public-domain status.
Implementations
Because GS1 DataMatrix is Data Matrix ECC 200 plus formatting rules, any ECC 200 encoder/decoder can produce or read the cells; GS1 DataMatrix support specifically means the library understands AI formatting and leading-FNC1 placement [7].
Open-source libraries with verified GS1 DataMatrix support:
| Repo | Language | Stars | License | Last release | Notes |
|---|---|---|---|---|---|
| zxing/zxing | Java (+ many ports) | 34,000 | Apache-2.0 | active 2025 | The de-facto open-source 1D/2D reader. Decodes Data Matrix ECC 200 and returns the ]d2 symbology identifier when the leading FNC1 marks GS1 mode [7] |
| metafloor/bwip-js | JavaScript | 2,400 | MIT (+ OFL fonts) | v4.11.1, 28 May 2026 | BWIPP-derived encoder; ships a dedicated gs1datamatrix mode that handles AI input and FNC1 placement automatically — the canonical browser/Node generator [9] |
| zint/zint | C | 771 | BSD-3 (lib) / GPLv3+ (CLI/GUI) | active 2026 | Comprehensive 50+-symbology generator with GS1 mode for Data Matrix (zint --barcode=71) — auto FNC1, AI validation, ECC 200 fixed [10] |
| dmtx/libdmtx | C | 360 | Simplified BSD | active | Long-standing pure ECC 200 encoder/decoder; GS1 mode is achieved by writing a leading FNC1 byte in the payload (the library itself does not validate AIs) — pairs with pylibdmtx for Python bindings [11] |
Other practical encoders:
- Python —
pylibdmtx(wraps libdmtx);treepoem(wraps Barcode Writer in Pure PostScript, which has full GS1 DataMatrix AI support). - Industrial and pharma line equipment — serialisation print-and-verify systems (from vendors such as Cognex, Omron Microscan, and pharma-specific track-and-trace suppliers) generate and grade GS1 DataMatrix on packaging lines.
- Scanners and mobile SDKs — every commercial 2D imager (Cognex, Datalogic, Honeywell, Zebra) decodes GS1 DataMatrix; commercial mobile SDKs (Scandit, Scanbot, Dynamsoft) parse AI fields.
Open standards documentation:
- GS1 General Specifications / GS1 DataMatrix guideline — define the GS1 DataMatrix profile, the FNC1 rule, and the AI registry.
- ISO/IEC 16022:2024 — the canonical specification of the underlying Data Matrix symbology.
Comparison
vs. data-matrix (the base symbology) — Data Matrix ECC 200 is the general-purpose 2D symbology that can encode arbitrary data. GS1 DataMatrix is a constrained application of it: same cells, same Reed–Solomon EC, but a mandatory leading FNC1 and a strict GS1 AI data model. Choose plain Data Matrix for arbitrary payloads (direct-part-marking serial numbers, internal IDs); choose GS1 DataMatrix when the data must be standardised AI element strings that GS1-aware systems will parse.
vs. gs1-128 — Both encode the same GS1 Application Identifier structure with the same leading-FNC1 mechanism, but GS1-128 is 1D linear and GS1 DataMatrix is 2D. GS1-128 dominates pallets and outer packaging where horizontal label space is plentiful and 1D laser scanners are entrenched; GS1 DataMatrix dominates consumer drug cartons and small retail packaging where space is scarce and a 2D imager is available.
vs. gs1-qr-code — Both are 2D GS1 AI carriers using leading FNC1. GS1 DataMatrix is favoured in regulated healthcare/pharma serialisation (smallest footprint, established line equipment, 30 % damage tolerance) reported as ]d2; gs1-qr-code is favoured for consumer-facing retail and is the natural pairing with GS1 Digital Link web-resolvable URLs, reported as ]Q3.
vs. gs1-databar — GS1 DataBar is a compact 1D family carrying GS1 AIs for small retail items at point of sale. GS1 DataMatrix carries the same AI data model in 2D with far higher capacity, enabling full serialisation rather than just GTIN + a date or weight.
The parentheses in (01), (17), (10) are never encoded in the symbol [1, 6] — they appear only in human-readable text to delimit Application Identifiers for the eye. The parser reconstructs field boundaries entirely from the AI registry (fixed-length AIs) and FNC1 separators (after variable-length AIs).
GS1 DataMatrix and GS1-128 share a single design idea [1] — leading FNC1 + the AI registry — applied to two different base symbologies. Learn the data model once and it transfers between the 1D logistics label and the 2D drug carton.
The symbology identifier ]d2 is how a scanner tells software "this is GS1 DataMatrix" [3] — the d denotes Data Matrix and the 2 denotes ECC 200 with a leading FNC1. Software that ignores the identifier and the leading FNC1 is the usual cause of mis-parsed serialisation data.
Six years of GS1 DataMatrix on EU drug packs caught only 11 falsifications. Between the FMD verification system's go-live in February 2019 and the European Commission's 2024 evaluation, only 11 confirmed cases of falsified medicines were detected in the legal EU/EEA supply chain (30 total cases over 2011–2024) [8]. With 2,900+ MAHs, 4,000+ wholesalers and 115,000+ pharmacies all scanning the code on every dispense, this is either an extraordinary deterrent effect or a sign that falsifiers stay out of the legal chain entirely — either reading favourable to GS1 DataMatrix as the regulatory carrier.
One serialised pack format anchors a US$9.7 B market by 2035. The pharma track-and-trace solutions market is estimated at US$2.5 B in 2026 and projected to grow to US$9.7 B by 2035 at a 16.1 % CAGR — almost all of which assumes GS1 DataMatrix as the pack-level data carrier on regulated drug products [8].
Status
Active, foundational, and growing in regulated and retail use [1, 3]:
- GS1 General Specifications maintain GS1 DataMatrix as a current, core barcode standard.
- The underlying ISO/IEC 16022 Data Matrix spec is current (2024 edition) and public-domain / royalty-free.
- Mandated as the pharmaceutical serialisation carrier in the EU (FMD) and increasingly in the US (DSCSA).
- Expanding into retail via GS1's "2D barcodes at retail point of sale" programme.
Strategic context:
- GS1 maintains GS1 DataMatrix in parallel with gs1-128, gs1-qr-code, and gs1-databar; all four carry the same AI data model, and the choice is driven by available space, scanner infrastructure, and whether a web-resolvable Digital Link is wanted, rather than by data capability.
- GS1 DataMatrix's grip on healthcare and pharmaceutical serialisation is unchallenged.
- No deprecation is planned.
Sources
- GS1 DataMatrix — GS1 Standards
- ISO/IEC 16022:2024 — Data Matrix specification
- Data Matrix — Wikipedia
- GS1 Healthcare
- GS1 Application Identifiers — GS1
- zxing/zxing — GitHub
- FMD Explained: Pharma Serialization & Barcodes — IntuitionLabs
- metafloor/bwip-js — GitHub
- zint/zint — GitHub
- dmtx/libdmtx — GitHub
Deployments
No country reports mention this standard by name.
Regions / aggregations not mapped to a single country
- Universal
Deployments
No country reports mention this standard by name.
Regions / aggregations not mapped to a single country
- Universal