Veribl logo

Identifiers and data

What is a Data Matrix code?

Also called Data Matrix, DataMatrix, GS1 DataMatrix, 2D barcode, 2D code, ECC 200, ISO/IEC 16022, GS1 QR code, 2D matrix code

In short

Data Matrix is a square two-dimensional (2D) barcode standardized in ISO/IEC 16022 that stores a lot of data in a very small space. GS1 DataMatrix is the GS1 version: it encodes a GTIN with data such as batch, expiry date and serial number, and is the standard 2D barcode for regulated healthcare products. Alongside QR codes, it is one of the 2D barcodes retail checkouts are moving to by the end of 2027.

Standard
ISO/IEC 16022, error correction ECC 200
GS1 DataMatrix
The ECC 200 subset of ISO/IEC 16022 that encodes GS1 element strings with the FNC1 character
Typical data
GTIN (01), batch or lot (10), expiry date (17), serial number (21)
Main uses
Regulated healthcare products, direct part marking of medical devices, very small items, and retail point-of-sale
Retail 2D target
GS1 Ambition 2027 (Sunrise 2027 in the US): POS scanning able to read the GTIN from 2D barcodes by the end of 2027
EU medicines
Delegated Regulation (EU) 2016/161, Article 5: the unique identifier must be a Data Matrix, applying from 9 February 2019

A Data Matrix code is a two-dimensional barcode made of small square cells arranged in a square or rectangle. It holds far more data than a linear barcode in a much smaller space, which is why it is common on medicines, medical devices and very small items.

Data Matrix and GS1 DataMatrix

Data Matrix is defined in the international standard ISO/IEC 16022. GS1 uses the version with ECC 200 error correction, which lets a reader recover data when part of the code is damaged.

GS1 DataMatrix is the GS1 form of it. The GS1 General Specifications describe it as the ECC 200 subset of ISO/IEC 16022 that supports GS1 data structures in element string syntax, including the special Function 1 character (FNC1). A typical code carries several GS1 Application Identifiers:

(01)09506000134352(17)271231(10)ABC123(21)A1B2C3

That is a GTIN, an expiry date, a batch or lot number and a serial number in one small symbol.

Plain Data Matrix can also carry a GS1 Digital Link web address instead of element strings, the same way a QR code does.

Data Matrix vs QR code

GS1 DataMatrixQR Code with GS1 Digital Link
StandardISO/IEC 16022ISO/IEC 18004
Data formatGS1 element stringsA web address with the GTIN and other data in the path
Opens on a phone cameraNot as a web pageYes, with the default camera app
Typical useRegulated healthcare, small partsConsumer products, packaging, product passports

GS1's retail guideline states that a QR code with GS1 Digital Link is the current preference for consumer engagement because the default camera on any mobile device can scan it. It also notes that GS1 DataMatrix "does not offer the web connectivity" of a QR code or a Data Matrix with GS1 Digital Link. Both symbols work at retail checkout.

Where Data Matrix is used

  • Healthcare: in the EU, Delegated Regulation (EU) 2016/161 requires medicine packs to carry a unique identifier in a Data Matrix (Article 5), applying from 9 February 2019. Codes conforming to ISO/IEC 16022:2006 are presumed to meet the requirement.
  • Medical devices and very small items: the GS1 General Specifications cover direct part marking of medical devices with GS1 DataMatrix, and note that many uses are on very small items with curved surfaces, such as vials, ampoules and small bottles.
  • Retail: GS1 DataMatrix is one of the three 2D barcodes approved for retail point-of-sale.

The 2027 move to 2D barcodes

GS1 calls it Ambition 2027 globally and GS1 US calls it Sunrise 2027. The goal, in GS1's words, is "for retail point-of-sale (POS) scanning to be globally capable of reading and processing the GTIN from both existing linear and 2D barcodes by the end of 2027". It is an industry goal, not a law.

The approved retail 2D barcodes are a QR Code with GS1 Digital Link URI syntax, a Data Matrix with GS1 Digital Link URI syntax, and GS1 DataMatrix. Until 90% of POS scanning solutions can read them and capture at least the GTIN, products that use a retail 2D barcode must also keep their linear EAN or UPC barcode. Our GS1 Sunrise 2027 guide covers what this means for packaging.

Data Matrix and the Digital Product Passport

ESPR defines a data carrier in Article 2(29) as "a linear barcode symbol, a two-dimensional symbol or other automatic identification data capture medium that can be read by a device". A Data Matrix fits that definition, and each product group's delegated act decides which carriers to use and where. For a passport that consumers should open with a phone, a QR code with GS1 Digital Link is usually the more practical choice. A Data Matrix with GS1 Digital Link works where space is tight.

How to choose

  • Regulated healthcare product: follow the sector rules, which in practice means GS1 DataMatrix.
  • Consumer product with a passport or support page: a QR code with GS1 Digital Link, so shoppers and checkouts read the same code.
  • Very small product or part: Data Matrix, with GS1 Digital Link if people need to open a web page.
  • Test before printing: check size, quiet zone and contrast against the GS1 symbol specification tables. You can create test codes with the free barcode generator.

How Veribl helps

The free Veribl barcode generator creates GS1 DataMatrix codes from your GTIN, along with EAN-13, UPC-A and GS1-128. For consumer-facing codes, Veribl creates a GS1 Digital Link QR code for every model, batch and unit that opens the product's passport and support page.

Try the free barcode generator

Official sources

Frequently asked questions

What is a Data Matrix code?

A Data Matrix is a square or rectangular 2D barcode made of black and white cells, defined in ISO/IEC 16022. It holds far more data than a linear barcode in a small area, and its ECC 200 error correction helps it scan when partly damaged.

What is the difference between Data Matrix and a QR code?

Both are 2D barcodes. Data Matrix (ISO/IEC 16022) is very compact and common on medicines, medical devices and very small items. QR Code (ISO/IEC 18004) is what phone cameras open by default, which is why GS1 prefers a QR code with GS1 Digital Link for consumer engagement. GS1 DataMatrix is the approved choice for regulated healthcare.

What is a GS1 QR code?

A QR code that carries GS1 data, usually a GS1 Digital Link web address such as https://example.com/01/09506000134352/21/A1B2C3. A checkout scanner reads the GTIN from it, and a phone opens the web page. GS1 also permits a QR code with GS1 element strings.

Can a phone scan a Data Matrix code?

Many phones and scanning apps can read Data Matrix, but the default camera app is built around QR codes. GS1 notes that GS1 DataMatrix does not offer the web connectivity of a QR code or of a Data Matrix with GS1 Digital Link.

What 2D barcodes are accepted at retail checkout?

GS1's retail guideline lists three: QR Code with GS1 Digital Link URI syntax, Data Matrix with GS1 Digital Link URI syntax, and GS1 DataMatrix. Until 90% of POS scanning solutions can read them, products using a retail 2D barcode must also carry their linear EAN or UPC barcode.

Can a Data Matrix be the data carrier for a Digital Product Passport?

Yes. ESPR Article 2(29) defines a data carrier as a linear barcode symbol, a two-dimensional symbol or other automatic identification data capture medium that can be read by a device. Each product group's delegated act decides which carriers to use.

Last reviewed