Guides
DataMatrix or QR code for laser marking: differences and sizes
For laser marking, DataMatrix is the code suited to small parts and industrial readers; the QR code is read with a smartphone and needs a wider margin. Capacity, error correction and quiet zone differ. COOLASER, a laser workshop in Italy, based in Gaeta (LT), marks codes with variable data from a file; the quote is requested through the online form.
On this page
In plain terms
In plain terms
DataMatrix and QR codes are squares made of light and dark dots, which a reader turns into text: a serial number, a batch number, a web address. The QR code is the one scanned with a phone and is recognised by the three squares in its corners. The DataMatrix has an L-shaped border and takes up less space, which is why it is found on small industrial parts. The linear barcode holds less data and needs length. When laser marked, the code is made in the material of the part: it is not an applied label.
DataMatrix: the code for small parts
DataMatrix is a two-dimensional matrix code defined by the standard ISO/IEC 16022 (2024 edition), which writes it “Data Matrix”. In the ECC 200 version, the one in general use, it has these characteristics:
- a square shape in 24 sizes, from 10 Ă— 10 to 144 Ă— 144 modules, or a rectangular shape in 6 sizes, from 8 Ă— 18 to 16 Ă— 48 modules;
- a solid L-shaped border on two sides, which the reader uses to find and orient the symbol;
- Reed-Solomon error correction, in an amount fixed by the symbol size and not chosen by whoever generates the code.
GS1 DataMatrix is the same symbol with the data ordered according to the GS1 rules: an FNC1 character in the first position and the application identifiers.
QR code: the code read with a smartphone
The QR code is a two-dimensional matrix code developed by DENSO WAVE and defined by the standard ISO/IEC 18004 (2024 edition). Its characteristics:
- 40 versions, from version 1 with 21 Ă— 21 modules to version 40 with 177 Ă— 177 modules, with 4 more modules per side at each version;
- three position detection patterns in the corners, which allow reading from any direction;
- Reed-Solomon error correction at four selectable levels: L, M, Q and H restore approximately 7, 15, 25 and 30% of the codewords.
A higher level withstands dirt and damage better but, for the same data, enlarges the code: DENSO WAVE indicates Q or H for factory environments.
Linear barcodes
A linear barcode carries data in one direction only, in the sequence of bars and spaces, and grows in length with the number of characters. It requires a quiet zone on both sides: for GS1-128 this equals 10 times the narrowest bar. On laser-marked parts it is used when the readers in service already read that format.
Comparison
The table compares DataMatrix and QR code in laser marking.
| Feature | DataMatrix (ECC 200) | QR code |
|---|---|---|
| Standard | ISO/IEC 16022 | ISO/IEC 18004 |
| Smallest symbol | 10 Ă— 10 modules | 21 Ă— 21 modules |
| Largest symbol | 144 Ă— 144 modules | 177 Ă— 177 modules |
| Maximum capacity | 3,116 digits or 2,335 alphanumeric characters | 7,089 digits or 4,296 alphanumeric characters |
| Error correction | Reed-Solomon, fixed by the symbol size | Reed-Solomon, four selectable levels (approximately 7, 15, 25, 30%) |
| Quiet zone | 1 module on each side | 4 modules on each side |
| Reference for the reader | L-shaped border on two sides | three squares in the corners |
| Typical reading | industrial image-based readers | smartphone camera |
Module size and quiet zone
The module is the elementary square of the code: its size, known as the X-dimension, determines how large the symbol is. The quiet zone is the clear margin around the symbol, free of marks and borders. The module size in millimetres depends on the application and the sector; the GS1 General Specifications (version 26.0, January 2026) give these values for direct part marking.
| Symbol and use | Minimum module | Target module | Maximum module | Quiet zone |
|---|---|---|---|---|
| GS1 DataMatrix, items other than medical devices | 0.254 mm | 0.300 mm | 0.615 mm | 1 module |
| GS1 QR Code, items other than medical devices | 0.254 mm | 0.300 mm | 0.615 mm | 4 modules |
| GS1 DataMatrix with connected modules (laser), small medical and surgical instruments | 0.100 mm | 0.200 mm | 0.300 mm | 1 module |
GS1 recommends the largest module that the marking area allows. A worked example: with 0.3 mm modules, a 14 Ă— 14 DataMatrix measures 4.2 mm per side, 4.8 mm with the quiet zone; the smallest QR code, 21 Ă— 21 modules, measures 6.3 mm per side, 8.7 mm with the quiet zone. The values concern GS1 codes: a code for internal use follows the specification of the customer or of its sector.
How readability is verified
The readability of a two-dimensional code is measured with a verifier, an instrument that captures the symbol and grades its quality. There are two reference standards:
- ISO/IEC 15415 (2024 edition): it assigns a grade from 4, the highest, to 0. The parameters measured include symbol contrast, modulation and unused error correction.
- ISO/IEC 29158 (2025 edition, which replaces the 2020 edition): it adapts the ISO/IEC 15415 method to codes marked directly on the part, with alternative lighting conditions. The result is reported as a DPM grade, from “direct part marking”.
A read test shows that the code can be read by a given reader; the quality grade is obtained only with a verifier. The minimum grade is set by the specification of the customer or of the sector.
Laser mark and code contrast
The reader distinguishes the modules by contrast, so the type of laser mark is chosen according to the material. On stainless steel, dark marking or annealing gives dark modules on a light background. On anodised aluminium the code appears light on the coloured background: DataMatrix can also be marked this way, provided the reader handles inverted reflectance. The types of mark are explained in the guide Marking, engraving or annealing.
Variable data from a file: how COOLASER works
COOLASER marks DataMatrix codes, QR codes, barcodes, serial numbers and batch numbers on metals and plastics, with different content on each part. The data arrive in an Excel (XLS, XLSX) or CSV file, or from a numbering rule, with a starting number and a quantity. The content of the code, including the GS1 or UDI structure, is defined by the customer; the workshop marks the symbol.
The request requires the material, the available space and the reading method. Before the batch, a sample part is marked and its reading is tested. The workshop does not declare quality grades or conformity to standards. Sizes and materials are on the page Serial numbers, QR and DataMatrix; the quote is requested through the request form.
Sources and checks
- GS1, “GS1 General Specifications Standard”, version 26.0, January 2026, accessed 19 November 2026
- GS1, “GS1 DataMatrix Guideline”, version 2.5.1, accessed 19 November 2026
- DENSO WAVE, “QR Code Standardization”: QR code specifications and standards, accessed 19 November 2026
- ISO, standard page for ISO/IEC 16022:2024 (Data Matrix), accessed 19 November 2026
- ISO, standard page for ISO/IEC 18004:2024 (QR code), accessed 19 November 2026
- ISO, standard page for ISO/IEC 15415:2024 (quality of two-dimensional symbols), accessed 19 November 2026
- IEC, standard page for ISO/IEC 29158:2025 (quality of codes marked on the part), accessed 19 November 2026
- Keyence, “What is a DataMatrix code?”, accessed 19 November 2026
Facts last checked: 19 November 2026
Frequently asked questions
Is DataMatrix or QR code better for marking a part?
For a small part read by industrial readers, DataMatrix is the suitable choice; for a code to be scanned with a smartphone, the QR code is. For the same module size, DataMatrix takes up less space: it starts at 10 Ă— 10 modules, the QR code at 21 Ă— 21.
How much data does a DataMatrix hold?
A DataMatrix holds up to 3,116 digits or 2,335 alphanumeric characters in its largest size, 144 Ă— 144 modules. More data requires a symbol with more modules.
How small can a laser-marked DataMatrix be?
The GS1 specifications for direct part marking indicate a minimum module of 0.254 mm, which falls to 0.100 mm on small surgical instruments. The side of the symbol is the number of modules multiplied by the module size, plus the quiet zone.
What is the quiet zone of a code?
The quiet zone is the clear margin around the code: at least one module for DataMatrix, four for the QR code. No marks or borders are placed inside it.
How is a DataMatrix marked directly on the part verified?
It is verified with a verifier that applies the standard ISO/IEC 15415 and, for direct part marking, ISO/IEC 29158. The result is a grade from 4 to 0, reported as a DPM grade.
Can a different code be marked on each part?
Yes, with variable data each part receives its own code, serial number or batch number. The data arrive in the customer's Excel (XLS, XLSX) or CSV file, or from sequential numbering.
Guides
COOLASER, a laser workshop in Italy, based in Gaeta (LT), marks codes with variable data from a file; the quote is requested through the online form.