1. Home
  2. Glossary
  3. Barcodes & labeling

Glossary · Barcodes & labeling

What is a Data Matrix code?

The small square on every medicine pack and on many components. The Data Matrix code stores a lot in a tiny area and even lasts as a laser engraving on metal. Here you will learn how it is structured, what a GS1 code on a pack contains and when it is worth using in your own warehouse.

  • 5 min read
  • Updated November 2026
  • With label generator
Structure of a Data Matrix code: L-shaped finder pattern and opposite timing pattern L finder pattern shows position and size Timing pattern defines the grid Data area with Reed-Solomon correction
Schematic illustration. Instead of three corners as with the QR code, the scanner orients itself by a solid “L”.

In brief

A Data Matrix code is a two-dimensional code made of square or rectangular modules, recognizable by an L-shaped solid border. It is standardized in ISO/IEC 16022 and stores the same content in a smaller area than a QR code. As GS1 DataMatrix, it is the standard on prescription medicines and many medical devices.

StandardISO/IEC 16022
Recognizable byL-shaped finder pattern
Sizefrom approx. 10 × 10 mm
Typically onmedicines, components

Data Matrix code: definition

The Data Matrix code is a relative of the QR code, but optimized for other uses. It needs less space, tolerates direct marking by laser or dot peen and is read especially quickly by handheld scanners. That is why you find it wherever space is tight or the code has to last a product’s lifetime: on circuit boards, tools, implants and medicine packs.

Data Matrix or QR code?

CriterionData MatrixQR code
Distinguishing featureL border and timing patternThree finder patterns
Space needed for short contentSmallerSlightly larger
Direct marking on metalVery well suitedPossible, but less common
Reading with a phone cameraWith a suitable appWith any camera app
Typical usePharma, medical, industry, toolsInventory, shelves, links

Rule of thumb: for labels that employees scan with their phone, the QR code is the safe choice. For very small parts and engraved codes, Data Matrix has the edge.

Example: what the code on a medicine pack contains

GP practice, practice suppliesPack of a prescription medicine, GS1 format

Since February 2019, prescription medicines in the EU have carried a Data Matrix code with a serial number. In GS1 format, each piece of information is introduced by an identifier in brackets, the Application Identifier. A scanner reads, for example:

  1. (01) Product number, here an NTIN derived from the German PZN04012345000016
  2. (17) Expiry date in the format YYMMDD280531 → 31 May 2028
  3. (10) Batch numberB4471X
  4. (21) Serial number, unique per pack7Q2K9MZ41H

One code, four pieces of information: product, expiry, batch and the individual pack. Exactly what you need for FEFO and recalls.

Per scanProduct · expiry · batch · serial number

Values in the example: invented, but in the real format. Under the EU Medical Device Regulation, medical devices also increasingly carry a UDI code, often as GS1 DataMatrix.

When Data Matrix pays off in your own warehouse

  • Small parts: drill bits, bits, measuring tools, gauges – where there is no room for a QR code.
  • Engraving: tools that would not survive a label get the code lasered on.
  • Use existing codes: medicines, sterile goods and many industrial parts carry the code from the factory.
  • Handheld scanners in use: with a 2D scanner, Data Matrix is read especially fast.

4 typical mistakes with Data Matrix codes

  • Printing too small. Below about 10 × 10 mm, it gets difficult for office printers and phone cameras.
  • Forgetting the quiet zone. Data Matrix also needs a light border, otherwise the L border cannot be found.
  • Assuming every camera app reads it. For employees without a suitable app, use a QR code instead.
  • Misreading GS1 content. The numbers in brackets are identifiers, not part of the data. (17) means expiry date, not item 17.

Data Matrix with Scanwiz

Scanwiz reads Data Matrix codes just like QR codes, Code 128 and EAN – with the phone camera in the app for iOS and Android or with a USB or Bluetooth handheld scanner. You can create Data Matrix labels for tools and small parts free of charge with our label generator. For medicines and sterile goods, you can manage batches with expiry dates from the Growth plan.

Batch list in Scanwiz with batch number, expiry date, remaining shelf life and quantity
Batches with expiry date and remaining shelf life.
  • Reads QR code, Data Matrix, Code 128 and EAN
  • Free Data Matrix labels with the generator
  • Batches with expiry dates from Growth

Frequently asked questions about the Data Matrix code

What is a Data Matrix code?

A two-dimensional code with an L-shaped finder pattern, standardized in ISO/IEC 16022. It stores numbers or text in a very small area and is also suitable for laser engraving.

What is the difference between Data Matrix and QR code?

Data Matrix is more compact for short content and is often engraved directly onto parts. The QR code can be read by any smartphone camera and is therefore usually the better choice for labels that are scanned with a phone.

Why do medicines have a Data Matrix code?

Since February 2019, prescription medicines in the EU must carry a unique code with a serial number to prevent counterfeiting. It contains the product number, batch, expiry date and serial number.

Can I create Data Matrix codes myself?

Yes. With the free Scanwiz label generator you can create up to 100 Data Matrix labels per PDF, without signing up.

Sources & methodology

  1. Wikipedia: Data Matrix. en.wikipedia.org, accessed 10 November 2026.
  2. Delegated Regulation (EU) 2016/161 on safety features on medicine packs, in force since 9 February 2019.
  3. GS1: Application Identifiers at a glance.
  4. Sample values: fictitious, created in GS1 format by Scanwiz.

Updated November 2026 · Scanwiz editorial team

Over 250 customers already trust Scanwiz

From the glossary to your warehouse – Scanwiz does the rest.

Minimum stock, stocktakes, inspection intervals and batches run automatically in Scanwiz as part of your daily work. Try it free for 14 days with your whole team – no credit card required. Or let us show you everything in a personal demo.

4.9 out of 5 stars from more than 120 verified customer reviews
GetAppCapterraSoftware AdviceG2
✓ GDPR-compliant & hosted in the EU✓ No credit card required✓ Cancel anytime
Scanwiz Favicon
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.