Want customers to open your menu by pointing their phone at a poster? A QR code is usually the practical choice. To identify a small part or a product with a suitable reader, Data Matrix can be useful: it often takes up less space.
Both are barcodes made of small squares. They can hold text, a number or a link. Their patterns follow different rules, and a device that reads one cannot necessarily read the other.
How can you tell them apart?
A standard QR code has three large squares in three of its corners. Data Matrix has two solid edges forming an L; the other two alternate black and white. These patterns help a device find the code even when it is rotated. Keyence illustrates the structure.
Data Matrix
Two solid edges forming an L.
QR code
Three large squares in the corners.
Can my phone read both?
Many phones can open QR links with their built-in camera. Data Matrix support is less widespread: you may need a compatible app, as GS1 Sweden explains.
The content matters too. A code containing a batch number returns that number when read. To open a web page directly, use a code containing its address and an app that can open it. Recognising the pattern and opening a link are two separate steps.
You can try both “Short link” codes in the comparison below. We checked the files on a computer, without testing a phone camera. If your phone cannot read the Data Matrix, its support for the format may be the reason.
Which should you choose for your project?
For a menu, poster or instructions meant for the public, a QR code is usually the practical choice. Visitors can more readily open the link with their camera. Try it on several phones and at the intended distance before printing a large batch.
For tracking parts or products with readers you have already chosen, Data Matrix can save space. Check what the reader and software accept, as well as how clearly the code is printed or marked. If a customer requires GS1 DataMatrix, follow that requirement: a QR with the same text is not an automatic replacement.
Want to change the page people reach after printing? Both formats can contain an intermediate link that sends visitors to your chosen page. This is called a redirect. If you can manage that redirect, you can change the destination while keeping the same code. For a QR project, our generator finder helps you compare tools based on the features you need; it does not compare industrial Data Matrix readers.
Does Data Matrix take up less space?
It does in our three examples, but the result depends on the content and settings. We gave both formats exactly the same text and displayed their small squares at the same size. Choose a number, a short link or a longer link to see the space needed.
14 × 14 small squares
16 × 16 including the white margin
21 × 21 small squares
29 × 29 including the white margin
Both contain exactly:123456789012
20 × 20 small squares
22 × 22 including the white margin
25 × 25 small squares
33 × 33 including the white margin
Both contain exactly:https://www.qrbench.com/
32 × 32 small squares
34 × 34 including the white margin
33 × 33 small squares
41 × 41 including the white margin
Both contain exactly:https://www.qrbench.com/journal/can-we-run-out-of-qr-codes/
Every small square has the same size on screen. Totals include the white margin each format needs.
A code also needs empty space around it so the reader can distinguish it from the rest of the label. That minimum margin is four small squares wide on each side for QR, compared with one for Data Matrix. The sources below give the exact requirements.
With the short link, Data Matrix and its margin occupy a square 22 cells wide, compared with 33 for QR. A longer address may need a larger grid: one example cannot represent every code.
This comparison measures the space used. It does not prove that either code scans better or withstands scratches better. Print sharpness, material, distance and the device all matter. Test the code at its actual size on the final material.
What is GS1 DataMatrix for?
Picture a box whose code contains a product number, a batch number and an expiry date. The software needs to know which part of the message means what. GS1 rules give these details a shared structure.
Data Matrix defines the pattern’s format; GS1 DataMatrix also specifies how to arrange the information inside it. Simply typing “product, batch, date” into an ordinary Data Matrix is not enough to create a compliant GS1 DataMatrix. The GS1 guideline explains the rules.
Such a code can help track a product without opening a website. Follow your customer’s or industry’s requirements and check the result with the software that will read it. This article does not validate a label for regulated use.
Common questions
Can you convert Data Matrix to a QR code?
You can read the message, then create a QR containing that same message. The pattern changes. If the code is used to track products, check that the reader and software accept the new format and its data.
Which can hold more information?
The largest QR codes can hold more digits: up to 7,089, compared with 3,116 for the square Data Matrix studied here. These limits apply only to digits, with specific settings described in the sources. For a link, compare the space your own code will need. Our article on QR capacity explains these limits.
Does Data Matrix protect information better?
Its content is not automatically encrypted. A compatible device can read it, and the image can be copied. Protecting access or checking that a product is authentic requires other checks in the system using the code.
Sources and technical details
Scope and settings of the examples
The comparison covers standard square QR codes, Model 2, and square Data Matrix ECC 200. Micro QR and rectangular formats are excluded from our measurements. Data Matrix also offers rectangular shapes for some narrow surfaces; large symbols repeat their patterns between several data regions.
Each small square is called a module. The empty margin is the quiet zone. For the short link, the patterns alone measure 20 × 20 modules (Data Matrix) and 25 × 25 (QR); with margins, they measure 22 × 22 and 33 × 33. Available grid sizes increase in steps. The generator selects the size and encoding automatically here. Digits, uppercase letters and web addresses can use different encodings.
Error correction adds information to recover some damaged data. QR offers four levels, L, M, Q and H; our examples use M. Data Matrix ECC 200 determines correction with the symbol size. We have not established equivalent damage protection for these settings. Another encoding or correction setting can change the grid. The capacity limits cited apply only to digits and the largest grids, with L correction for QR: Keyence’s QR table and Data Matrix table.
GS1 DataMatrix uses field identifiers and an initial character called FNC1 to signal its structure to the reader. An ordinary QR or Data Matrix can also hold an address structured according to GS1 Digital Link. Both the pattern’s format and the data structure must be accepted by the receiving system.
All six images were checked with Apple Vision on a Mac. This checks the contents of the files; it does not replace a test with the camera app on an iPhone or an Android phone. The editorial review on 3 November adds no new scanning tests.
- Keyence, Data Matrix ECC 200 structure: finder patterns, regions and square or rectangular shapes.
- DENSO WAVE, QR code margins: four modules on each side of standard QR codes.
- GS1 DataMatrix Guideline, version 2.5.1: quiet zone, GS1 structure and FNC1.
- GS1, 2D Barcodes at Retail Point-of-Sale Implementation Guideline, version 1.1.0: module size and error correction. We do not use it to recommend a universal print size.
- GS1 Sweden, Data Matrix, GS1 DataMatrix and QR: mobile scanning and data structures.
- bwip-js, version 4.7.0, BWIPP engine dated 19 April 2025: local generation of all six symbols. Standard square QR with M correction; square Data Matrix ECC 200; automatic encoding and size, without logos or GS1 data. Data Matrix encoder options.
Sources checked on 22 October 2026. Both formats receive exactly the same characters in each example. The SVG files and their contents were checked separately; coloured overlays only explain the finder patterns. The size comparison includes minimum quiet zones. It does not measure phone scan rates, damage resistance or compliance of industrial markings.
Share this article