Skip to content
Glossary

What is a Data Matrix code?

Data Matrix codeA Data Matrix code is a square or rectangular 2D barcode with an L-shaped solid border on two sides and a dotted timing pattern on the other two. It packs data into very small spaces, so it is used to mark electronic parts, medicines, aerospace components and parcels. It is defined in ISO/IEC 16022. Unlike a QR code, it has no large corner squares.

How a Data Matrix is built

A Data Matrix is a grid of dark and light cells. Two adjacent sides are solid lines, forming an L that tells the scanner where the code is and which way up it sits. The other two sides alternate dark and light cells, a timing pattern that tells the scanner how many rows and columns there are. The data fills the space inside.

The current version, ECC 200, uses Reed-Solomon error correction, like a QR code, so a partly damaged mark can still be read. Square symbols range from 10 × 10 to 144 × 144 cells, and there are rectangular sizes for narrow labels. At the largest size a Data Matrix holds up to 2,335 alphanumeric characters or 3,116 bytes. The standard is ISO/IEC 16022, most recently revised in 2024.

Where Data Matrix codes are used

Its strength is size: a Data Matrix with a short number can be a few millimetres wide and still read reliably, and it can be printed, laser-etched or dot-peened straight onto metal and plastic. Typical uses:

  • Electronic components and circuit boards, where space is tiny.
  • Aerospace and automotive parts, marked permanently for traceability.
  • Medicines and medical devices, where GS1 DataMatrix carries the GTIN with batch, expiry and serial number.
  • Postal and parcel labels, used by several postal services.
  • Documents and tickets, where a small mark holds an ID.

Data Matrix vs QR code

Both are 2D barcodes with error correction; they were designed for different jobs.

  • Finding the code: a QR code has three large position squares in its corners; a Data Matrix has the L-shaped border and timing edges.
  • Size: a Data Matrix is usually smaller for the same short data, which suits parts and small packs.
  • Shape: Data Matrix comes in square and rectangular forms; standard QR codes are square.
  • Consumers: QR codes are what people expect to scan with a phone camera, and they are the usual choice for marketing and product links. Many barcode apps read both, but test with the phones your audience uses before relying on a Data Matrix for the public.
  • Standards: Data Matrix is ISO/IEC 16022; QR code is ISO/IEC 18004.

Product links: Data Matrix, QR and BN Shortener

For a code shoppers will scan, the GS1 approach is a GS1 Digital Link: a web address with the GTIN after /01/, printed as a QR code, which phones open as a link and retail scanners read as a product number. A GS1 DataMatrix can carry the same Digital Link URL where space is tight, but for consumer scanning QR is the safer choice.

BN Shortener makes QR codes, not Data Matrix codes. Give a short link a GTIN and it answers at a GS1 Digital Link address on b1.lc or your own domain, with routing and counts per GTIN. Batch, serial and expiry qualifiers are accepted but ignored. Use the free GS1 Digital Link generator to build the URL, then the QR code generator to print it.

Related: QR code, GTIN, /blog/gs1-digital-link-qr-codes/

Sources

  1. Wikipedia: Data Matrix, checked 2026-10-24
  2. Wikipedia: Global Trade Item Number, checked 2026-10-24

Questions

Can a phone scan a Data Matrix code?

Many barcode scanner apps can. Phone camera apps are built around QR codes, so test the phones your audience uses before printing a Data Matrix for the public.

How much data does a Data Matrix hold?

Up to 2,335 alphanumeric characters or 3,116 bytes in the largest 144 × 144 symbol. Most real codes hold far less and are much smaller.

What is GS1 DataMatrix?

A Data Matrix that carries GS1 data, such as a GTIN with batch, expiry and serial number. It is widely used on medicines and medical devices.

Is Data Matrix better than QR code?

For marking small parts or packs with an ID, often yes. For marketing and links people scan with a phone, a QR code is the better choice.

Does a Data Matrix have error correction?

Yes. The ECC 200 version uses Reed-Solomon error correction, so a partly damaged code can still be read.

Try it on your next link

The Free plan includes a custom domain, 5 dynamic QR codes, a bio page and click analytics. No credit card.