What DataMatrix is
DataMatrix is a two-dimensional code like QR, but with different geometry: it has solid L-shaped sides the scanner uses to find orientation, and the data sits in a dense grid of dots.
For the same amount of data DataMatrix is more compact than QR, which is why it is chosen for small packaging: ampoules, cigarette packs, jewellery tags. A one-centimetre square can hold a serial number.
Why marking uses it
Marking traces a product from factory to till. The code carries not only the item number but the serial number of that specific pack, so two identical packs differ.
That is what makes it useful against counterfeits and for accounting: at the till the code is retired, and the same pack cannot be sold twice. That is why marking uses DataMatrix with a unique serial.
How it differs from QR
Any phone reads QR; not every phone reads DataMatrix. The iPhone camera does not always recognise it, while dedicated marking scanners read both formats.
QR usually encodes a link or text, while DataMatrix in marking holds a strict structure: item identifier, serial number, verification code. It is not free text but fields with fixed lengths.
Another difference is size and density: DataMatrix can be printed very small, while QR with the same data would need more space.
Why a pack carries two codes
Often a marking DataMatrix and a QR linking to the brand site sit side by side. The first is for the state and the till, the second for the customer who wants to know more.
These are different jobs and cannot be merged into one code: marking requires an immutable serial, while a website link may change. So manufacturers print both.












