Standards/gs1-datamatrix-pharma
GS1 DataMatrix Pharma
Overview
GS1 DataMatrix pharma serialisation is a data-format application, not a separate symbology. It is the GS1 DataMatrix carrier (ECC 200 Data Matrix with FNC1 in the first position, carrying GS1 Application Identifier element strings) used to give each pack of a prescription medicine its own machine-readable identity 3. In the EU this "unique identifier" is a legal requirement under the Falsified Medicines Directive (2011/62/EU) and Commission Delegated Regulation (EU) 2016/161, applicable since 9 February 2019 1, 2. In the US the Drug Supply Chain Security Act (DSCSA) requires the product identifier on each package to be in a "2-dimensional data matrix barcode" 5.
The usual GS1 encoding carries four elements: GTIN (01), expiry date (17), batch/lot (10) and serial number (21), plus a national healthcare reimbursement number (AIs 710–717) where a country requires one 1, 3. The Regulation itself names no coding scheme; it accepts any internationally recognised syntax with data or application identifiers, and Germany, for example, also allows IFA's PPN Code 1, 11.
History
- 8 June 2011. Directive 2011/62/EU amended Directive 2001/83/EC to require "safety features" on medicines: features letting wholesalers and pharmacies verify authenticity and identify individual packs, plus an anti-tampering device. Prescription medicines must bear them by default, non-prescription medicines must not unless listed as at risk 2.
- 27 November 2013. In the US, DSCSA was enacted as Title II of the Drug Quality and Security Act (Pub. L. 113-54) 4.
- 2 October 2015. The Commission adopted Delegated Regulation (EU) 2016/161, published in the Official Journal on 9 February 2016. It fixed the content of the unique identifier, made a Data Matrix the carrier, and set up the repositories system 1.
- 2015 onward. The European Medicines Verification Organisation (EMVO), a Belgian non-profit, has managed the European Hub that links the national verification systems since 2015 10.
- 9 February 2019. The Delegated Regulation became applicable. Belgium, Greece and Italy, which already ran their own pack-identification systems, were given a transitional period; the original text required them to apply it by 9 February 2025 at the latest 1.
- 27 November 2024. FDA's one-year DSCSA "stabilisation period" ended. On 9 October 2024 FDA exempted eligible trading partners for longer: manufacturers and repackagers until 27 May 2025, wholesale distributors until 27 August 2025, and dispensers with 26 or more full-time employees until 27 November 2025 6.
- 6 August 2026. FDA issued exemptions for small dispensers (companies with 25 or fewer full-time pharmacists or pharmacy technicians) that run until 27 November 2027 7, 9.
Technical specification
What the EU Regulation requires (Art. 4–8) 1:
| Rule | Requirement |
|---|---|
| Data elements | Product code; serial number; national reimbursement or identification number if the Member State requires it; batch number; expiry date |
| Serial number | Numeric or alphanumeric, at most 20 characters, from a deterministic or non-deterministic randomisation algorithm; chance of guessing it "lower than one in ten thousand" |
| Uniqueness | Product code + serial unique to the pack until at least one year after expiry or five years after release, whichever is longer |
| Carrier | A Data Matrix with error correction at least equal to ECC 200; ISO/IEC 16022:2006 presumed compliant |
| Syntax | An internationally recognised coding scheme with data identifiers or application identifiers; ISO/IEC 15418:2009 presumed compliant. Mixed schemes: ISO/IEC 15434:2006 |
| Product code | Begins with characters specific to the coding scheme, identifies the product as a medicine, under 50 characters, globally unique; ISO/IEC 15459-3/-4:2014 presumed compliant |
| Print quality | Grade at least 1.5 under ISO/IEC 15415:2011 |
| Human-readable | Product code, serial and (if required) national number printed in clear text, unless the two longest pack dimensions add up to 10 cm or less |
| One code only | No other visible 2D barcode for identification and authenticity |
The GS1 encoding 3:
| AI | Element | Format | FNC1 after it |
|---|---|---|---|
01 |
GTIN | N2+N14 | no (predefined length) |
17 |
Expiration date | N2+N6 (YYMMDD) | no |
10 |
Batch or lot number | N2+X..20 | yes, unless last |
21 |
Serial number | N2+X..20 | yes, unless last |
710–717 |
National Healthcare Reimbursement Number: Germany PZN, France CIP, Spain CN, Brazil DRN, Portugal AIM, USA NDC, Italy AIC, Costa Rica SRN | N3+X..20 | yes, unless last |
- Concatenation. Variable-length elements end with FNC1 or
<GS>(ASCII 29); no separator is needed after the last element. Parentheses in printed text are only a readability aid and are not encoded 3. - FNC1 and ECC 200. FNC1 "SHALL be encoded at the beginning of the data string". ECC 200 is the only Data Matrix version that supports GS1 data and uses Reed–Solomon error correction. Square symbols run from 10×10 to 144×144 modules, with a one-module quiet zone 3.
- NHRN rule. An NHRN AI is used only where the GTIN alone does not meet a national requirement, and must always be used together with the GTIN 3.
- Marking levels. GS1 defines minimum, enhanced and highest AIDC marking levels for regulated healthcare trade items. The highest brand-owner level carries GTIN, batch/lot, expiry and serial 3.
- Print size. For healthcare items scanned in general distribution, GS1 DataMatrix X-dimension is 0.750–1.520 mm. For regulated healthcare retail items not scanned there, it is 0.396–0.990 mm (target 0.495 mm), at minimum grade 1.5 3.
Worked example (the playground default). (01)09521234500001(17)271231(10)ABC123(21)SN7X2P9Q carries GTIN 09521234500001, expiry 31 December 2027, batch ABC123 and serial SN7X2P9Q. GTIN and batch come from the General Specifications' own element-string example. Its GS1 Prefix 952 is reserved "for demonstrations and examples of the GS1 system", so it belongs to no real product 3. The fixed-length AIs come first, so the only FNC1 separator falls between (10) and (21).
US DSCSA. A "product identifier" is a standardised graphic, in human-readable and machine-readable form, carrying the standardised numerical identifier (the NDC plus a serial of up to 20 alphanumeric characters), the lot number and the expiry date 4. On a package it must be a 2D Data Matrix; on a homogeneous case it may be linear or 2D 5. GS1 provides AI 715 to carry the NDC as an NHRN 3.
Use cases
- Verification and decommissioning at dispensing (EU). A unique identifier is authentic when the repositories system holds an active identifier with the same product code and serial. Pharmacies must verify the safety features and decommission the identifier when they supply the pack to the public; hospital pharmacies may do so at any time while the pack is in the institution's possession 1. EMVS connects more than 115,000 commercial pharmacies and 6,000 hospital pharmacies 10.
- Recalls and pharmacovigilance. The Regulation includes product code, national number, batch and expiry in the identifier because they make recall, withdrawal and return procedures easier 1.
- Parallel trade and repackaging. A manufacturer that replaces the safety features must place an "equivalent" unique identifier that meets the destination Member State's product-code and national-number rules 1.
- Clinical trials. A pack repackaged as an investigational medicinal product must be verified and decommissioned first 1.
- US package-level tracing. DSCSA aims at an interoperable, electronic way to identify and trace certain prescription drugs at the package level 8.
- Hospital marking. GS1's "Highest – Hospital AIDC marking" level for pharmaceuticals uses GTIN and serial, with AI
7003for short-life products 3.
Implementations & ecosystem
- Repositories. In the EU, the European Hub connects the national systems of 29 countries. It links over 2,900 marketing authorisation holders, over 4,000 wholesale authorisation holders, and the pharmacies listed above. EMVO's founders are EFPIA, Medicines for Europe, PGEU, GIRP and Affordable Medicines Europe 10. In Germany, PharmaProtect Solutions GmbH connects pharmaceutical companies to the national system 11.
- Open-source code:
- gs1/gs1-syntax-engine (C, with C++, .NET, Java, Swift and JS/WebAssembly bindings; 52 stars; active Oct 2026): GS1's reference implementation for processing AI element strings and Digital Link URIs against the GS1 Barcode Syntax Dictionary 12.
- metafloor/bwip-js (JavaScript; 2,424 stars; Aug 2026): a port of Barcode Writer in Pure PostScript. Its
gs1datamatrixencoder drives this page's playground 13. - zint/zint (C; 820 stars; Oct 2026): an encoder covering Data Matrix and 50+ symbologies 16.
- zxing-cpp/zxing-cpp (C++; 2,062 stars; Oct 2026): a decoder whose support table lists Data Matrix ECC200 14.
- zxing/zxing (Java; 34,170 stars; Oct 2026): the original decoder library 15.
- dmtx/libdmtx (C; 369 stars; Jul 2026): a dedicated Data Matrix library 17.
- Round trip (own test, 19 Oct 2026). bwip-js
gs1datamatrixencoded the playground payload, zxing-wasm decoded it back to the same element string, and bwip-js refused the same GTIN with a wrong check digit (AI 01: Bad checksum).
Fun facts
- One visible 2D code per pack. Article 8 bans any other visible 2D barcode used for identification or authentication on an FMD pack 1. Germany's practical answer is an emblem printed beside the Data Matrix that counts, so pharmacy systems can ignore other codes: IFA's FAQ calls it "PPN" (or "NTIN") 11, while securPharm's coding rules of 10 September 2025 keep the letters "PPN" whether the code holds a PPN or an NTIN, and make the emblem mandatory only on packs that carry a second 2D code 18.
- The 952 prefix. GS1 keeps a whole GS1 Prefix, 952, for demonstrations and examples. That is why documentation GTINs such as 09521234500001 can never scan as a real product 3.
- Guessability in the law. The Regulation sets a numerical ceiling on how guessable a serial can be: lower than one in ten thousand 1.
Comparison
| EU FMD (2016/161) | US DSCSA | |
|---|---|---|
| Carrier | Data Matrix, ECC 200 or better 1 | 2D Data Matrix on packages; linear or 2D on homogeneous cases 5 |
| Product code | Any compliant coding scheme (GS1 GTIN, IFA PPN, …) 1, 11 | NDC-based standardised numerical identifier 4 |
| Serial | Up to 20 characters, randomised 1 | Up to 20 alphanumeric characters 4 |
| Other data | Batch, expiry, national number if required 1 | Lot and expiry 4 |
| Model | Verify against national repositories and decommission at supply 1 | Interoperable electronic package-level tracing 8 |
GS1 vs IFA coding (Germany). Germany accepts either a GS1 NTIN or an IFA PPN as the product code; both embed the German PZN 11. GS1 describes NTINs as nationally administered numbers drawn from the GTIN number pool, and warns that where an NTIN is used instead of a GTIN, one pack serving several markets may need several NTINs 3.
Data Matrix vs linear symbols. GS1 permits GS1 DataBar or GS1-128 for regulated healthcare retail items that need data beyond the GTIN 3. But both the EU Regulation and DSCSA (for packages) require a 2D Data Matrix 1, 5. For the same pack, GS1 also offers GS1 QR Code and GS1 Digital Link as syntaxes, but the EU Regulation's carrier is Data Matrix only 1, 3.
Status
Active and mandatory. The EU safety-features regime has applied since 9 February 2019 1. EMVO's site advertises "7 years of EMVS operation" and a network of 29 countries 10. In the US, the exemptions for manufacturers, wholesalers and large dispensers expired between May and November 2025 6, and the small-dispenser exemption runs to 27 November 2027 7. GS1 ratified Release 26.0 of the General Specifications in January 2026, adding AI 717 (Costa Rica) to the NHRN range 3. No successor carrier has been announced.
Sources
- 1 Commission Delegated Regulation (EU) 2016/161 — European Commission (EUR-Lex via Wayback), accessed 2026
- 2 Directive 2011/62/EU — European Parliament and Council (EUR-Lex via Wayback), accessed 2026
- 3 GS1 General Specifications Standard, Release 26.0 — GS1, accessed 2026
- 4 21 U.S.C. 360eee — Cornell LII, accessed 2026
- 5 21 U.S.C. 360eee-1 — Cornell LII, accessed 2026
- 6 DSCSA exemptions for certain trading partners, 9 Oct 2024 — FDA, accessed 2026
- 7 Exemptions under the DSCSA — FDA, accessed 2026
- 8 Drug Supply Chain Security Act (DSCSA) — FDA, accessed 2026
- 9 DSCSA Waivers, Exceptions, and Exemptions — FDA, accessed 2026
- 10 EMVO — European Medicines Verification Organisation, accessed 2026
- 11 IFA FAQ — IFA GmbH, accessed 2026
- 12 gs1/gs1-syntax-engine — GitHub, accessed 2026
- 13 metafloor/bwip-js — GitHub, accessed 2026
- 14 zxing-cpp/zxing-cpp — GitHub, accessed 2026
- 15 zxing/zxing — GitHub, accessed 2026
- 16 zint/zint — GitHub, accessed 2026
- 17 dmtx/libdmtx — GitHub, accessed 2026
- 18 securPharm Coding Rules (10 September 2025) — securPharm e.V., 2025
Deployments
No country reports mention this standard by name.
Regions / aggregations not mapped to a single country
- Universal