Data Matrix Reader: Scan Data Matrix and GS1 DataMatrix Online
Read a Data Matrix code from a photo, screenshot or your camera. Product codes on medicine packs and labels are split into plain fields: product number, expiry date, batch and serial. Free, nothing uploaded.
Built by Zeeshan · reviewed by Najeeb ur Rehman · last updated November 19, 2026 · checked against our testing process
Drop a photo or screenshot of the Data Matrix here
Or paste one with Ctrl+V. Read on your device, never uploaded.
How to read a Data Matrix code
- Take a clear photo of the code, close up and straight on, or take a screenshot if it is on a screen.
- Drop the image on the reader above, paste it with Ctrl+V, or tap Camera and hold the code inside the box.
- Read the result. A product code from a medicine box or food label is split into plain fields: the product number with its check digit tested, the expiry date and how long is left, the batch and the serial number.
- Plain text, such as a part or serial number, is shown as it is, with a copy button.
What a Data Matrix code is
A Data Matrix is a small square or rectangular 2D barcode with a solid L shaped border on two sides and a dotted border on the other two. The solid L tells the scanner where the code starts and which way up it is. It can hold up to about 2,300 characters, but most codes you meet hold a few dozen: a product number, a date, a batch and a serial.
Because it stays readable when it is tiny, Data Matrix is the code of choice where there is no room for a QR code: medicine packs, surgical tools, electronic parts, car parts and small labels. It can also be etched or dot-peened straight into metal, which is why some codes look like a grid of dots rather than black squares.
What the Data Matrix on a medicine box or product label means
Codes on packaging usually follow the GS1 standard, called GS1 DataMatrix. The data is a chain of fields, each starting with a two to four digit number in brackets, the Application Identifier (AI). The reader above turns them into plain words:
| AI | Field | Example |
|---|---|---|
| (01) | Product number (GTIN) | 09501101530003, the same number as the EAN-13 barcode, padded to 14 digits |
| (17) | Expiry date, YYMMDD | 281200 means December 2028; a day of 00 means the end of the month |
| (10) | Batch or lot number | L2409A |
| (21) | Serial number, unique to this one pack | 7HV2K9QX4D |
| (710) to (716) | National pharmacy codes | PZN in Germany, CIP in France, NDC in the United States |
The serial number is why medicine packs carry a Data Matrix. In the European Union, pharmacies scan it against a national register before the pack is handed over, so a copied or recalled pack is caught, and United States rules use the same kind of code to trace each pack through the supply chain. Reading the code at home shows you the same data, but only the pharmacy system can confirm the pack is genuine.
Why your phone camera will not read it
Most phone camera apps only look for QR codes, so a Data Matrix gets ignored rather than read wrongly. This reader looks for Data Matrix first and also tries the picture inverted, rotated and cleaned up, which helps with:
- Light on dark codes etched or laser marked into metal and plastic.
- Tiny codes a few millimetres wide: take the photo as close as the camera can still focus, usually 10 to 15 cm, then crop.
- Shiny surfaces: tilt the part slightly so the glare moves off the code.
- Curved packs: photograph the code straight on so it looks square in the picture.
If a code still will not read, it may be another kind: an Aztec code has a bullseye in the middle, a QR code has three large corner squares, and PDF417 is a wide stacked barcode. The reader shows which type it found.
Data Matrix or QR code?
| Data Matrix | QR code | |
|---|---|---|
| How to spot it | Solid L shaped border on two sides | Three large squares in the corners |
| Size for short data | Smaller | Larger |
| Shape | Square or rectangle | Square |
| Read by phone cameras | Often not | Yes |
| Typical use | Medicine, parts, small labels | Links, menus, WiFi, payments |
To make your own, use the Data Matrix generator, which also builds GS1 DataMatrix codes with the GTIN check digit worked out. For the product number on its own, the EAN-13 check digit calculator checks it, and barcode country codes explains the first digits.
Frequently Asked Questions
How do I read a Data Matrix code online?
Upload a photo or screenshot to the reader above, paste it with Ctrl+V, or use your camera. It reads the code in your browser and shows the text, or each product field in plain words.
Can I scan a Data Matrix with my phone?
Yes, with this page: open it on your phone, tap Camera and hold the code inside the box. The built-in camera app on most phones only reads QR codes, which is why it seems to ignore a Data Matrix.
What is GS1 DataMatrix?
A Data Matrix that carries product data in the GS1 format: a product number (GTIN), an expiry date, a batch and often a serial number. It is used on medicines, medical devices and more and more food and consumer packaging.
Can this reader tell me if a medicine is genuine?
No. It shows exactly what the code holds and checks that the product number is well formed, but only the pharmacy verification system can confirm that the serial number belongs to a genuine, unrecalled pack.
Why does it say the check digit does not match?
The last digit of a GTIN is calculated from the others. If it does not match, the code was printed with a wrong number, or part of the photo was misread. Try a sharper photo first.
Does it read laser etched or dot peen codes?
Often, yes. It tries the image as it is and inverted, which covers light on dark marking. Take the photo in even light at a slight angle so the surface does not reflect straight into the lens.
Is anything uploaded?
No. The image is read in your browser and never sent to a server. It is free with no signup.
Report a bug
Something not working as it should? Email hello@toolsque.com and tell us what you scanned, which browser or phone you used, and what happened instead. A photo of the code helps, unless it is on a prescription with personal details.
Changelog
- 19 November 2026: First release. Reads Data Matrix and GS1 DataMatrix from a photo, screenshot or camera, including light on dark and rotated codes, and explains each product field.
