Free online decoder
Data Matrix scanner
Scan the small square code on medicine packs, medical devices and electronic parts. GS1 data is split into GTIN, expiry date, lot and serial number.
- Free, no signup
- Decoded on your device
- Phone, tablet and PC
No barcode handy? Tap a sample to scan it
Results
Nothing scanned yet. Decoded barcodes print out here like a receipt.
- Start the camera, drop in an image or PDF, or type the number.
- Read the value, the barcode type and, for products and books, what it is.
- Copy it, search it on Google, or export the whole list to Excel.
How to scan a Data Matrix code
Get close. These codes are small, and the usual reason a scan fails is that the code takes up a tiny patch of the picture. Move in until it is large in the frame and the camera has focused, or take a close-up photo and upload it. Rotation does not matter. The code reads at any angle.
What a GS1 DataMatrix contains
Most Data Matrix codes on products follow GS1 rules. The data is a chain of fields, and each field starts with an application identifier of two to four digits that says what comes next. A typical medicine pack looks like this:
| AI | Field | Example | Meaning |
|---|---|---|---|
| (01) | GTIN | 09506000134352 | Which product this is |
| (17) | Expiry date | 271231 | December 31, 2027 |
| (10) | Batch / lot | LOT42 | Production run, used for recalls |
| (21) | Serial number | SN000123 | This one pack |
Tap the “Medicine pack” sample above to see this exact code decoded. This page splits the data at each identifier and writes dates out in full. The same identifiers appear in GS1-128 barcodes on cartons, which the Code 128 reader decodes.
Who uses Data Matrix
Healthcare is the biggest user. Pharmacies and hospitals scan it for pack serialization, expiry checks and bedside medication checks, and device makers put UDI codes on labels or etch them straight onto instruments. Electronics and aerospace firms mark part numbers and serials on components too small for a label. Postal services use it for digital postage marks. If you found one on a consumer product, it is most likely a batch or traceability code and not something meant for shoppers.
Related tools
For a full technical breakdown of any code, including the bytes in hex, use the barcode decoder. For the wide stacked code on ID cards, use the PDF417 scanner. 2D barcodes explained compares all the matrix formats.
FAQ
Data Matrix scanner: questions and answers
What is a Data Matrix code?
A square (sometimes rectangular) 2D barcode made of small black and white cells. You can recognize it by the solid L-shaped border on two sides and the dotted border on the other two. It stores up to 2,335 letters and digits and still reads when printed only 2 to 3 mm wide, which is why it is used on medicine packs, surgical instruments and circuit boards.
How is Data Matrix different from a QR code?
A QR code has three large squares in its corners. A Data Matrix has an L-shaped border and no corner squares. Data Matrix is smaller for the same data and is the standard in healthcare and manufacturing, while QR is the standard for consumer links and payments. Phone camera apps often read QR only, which is why Data Matrix codes need a scanner like this one.
Can I scan the code on a medicine box?
Yes. Prescription medicine packs in the EU, the US, India and many other countries carry a GS1 DataMatrix with the product number, expiry date, batch and a serial number, and the scan shows all four. It cannot tell you whether the pack is genuine. That check goes through a national verification system that only pharmacies and wholesalers can query.
What is a UDI barcode?
UDI means Unique Device Identification. Medical devices sold in the US and the EU must carry one, usually as a GS1 DataMatrix. It holds the device identifier (the GTIN) plus production details such as lot, serial number, manufacturing date and expiry date.
The code is tiny and will not scan. What can I do?
Get closer until the code fills at least a quarter of the frame, use the zoom slider if your phone shows one, and turn on the flashlight for engraved or dot-peened marks. For codes under 5 mm, take a close-up photo and upload it from the Image / PDF tab.
Same engine, different job
More barcode tools
- Scanner
Online barcode scanner
Camera, image, PDF and batch scanning for every common barcode.
- Scanner
QR code scanner
Scan QR codes from your camera, a photo or a screenshot.
- Scanner
UPC scanner
Read UPC-A and UPC-E codes and see the product behind them.
- Scanner
ISBN scanner
Scan a book barcode and get the title, author and cover.
- Scanner
PDF417 scanner
Decode driver’s license and boarding pass barcodes into fields.
- Scanner
Code 128 reader
Read Code 128 and GS1-128 shipping and logistics labels.
- Scanner
Barcode decoder
See raw data, symbology, check digits and GS1 fields.
- Scanner
Barcode scanner for PC
Scan with a laptop or desktop webcam. Nothing to install.
- Lookup
Barcode lookup
Type or scan a barcode number and find the product.
- Lookup
UPC lookup
Look up a 12-digit UPC and validate its check digit.
- Lookup
EAN lookup
Look up an EAN-13 and see its GS1 country prefix.
- Create
Barcode generator
Make UPC, EAN, Code 128, QR and more as PNG or SVG.