Skip to main content
Online Tool

Data Matrix Reader

Scan a Data Matrix code with your camera or upload an image. Built for healthcare, manufacturing, logistics, and GS1 DataMatrix payloads — decoded locally in your browser.

Point your camera at a Data Matrix code — the small square pattern, not a QR code.

Camera access requires HTTPS and a one-time permission.

Result

Scan or upload a Data Matrix code. The decoded value and detected format will appear here.

Where Data Matrix is used

Data Matrix dominates wherever the code has to be tiny, durable, and machine-readable. These are the four use cases this reader is tuned for.

Healthcare

GS1 DataMatrix on pharmaceutical packs encodes GTIN, batch, expiry and unique serial — required by EU FMD and US DSCSA traceability rules.

Manufacturing

Direct-part-marked Data Matrix on castings, PCBs and machined parts survives heat, oil and abrasion that would destroy a printed label.

Logistics

Compact Data Matrix labels fit on small parcels and components where a Code 128 wouldn't, while still carrying full SSCC and lot data.

GS1 DataMatrix

Standardized Data Matrix profile carrying GS1 Application Identifiers, used across retail, healthcare and supply chain.

Data Matrix vs QR code

Both are 2D codes, but they're built for different jobs. Use this quick comparison to confirm you're scanning the right thing.

FeatureData MatrixQR Code
Finder patternSolid L on two sides + timing on the other twoThree corner squares (and an alignment pattern)
Minimum practical sizeRoughly 2 × 2 mm with industrial printRoughly 10 × 10 mm for camera scanning
Typical payloadUp to ~2,300 ASCII charactersUp to ~4,300 ASCII characters
Common inHealthcare, manufacturing, aerospace, logisticsMarketing, payments, Wi-Fi, contacts
Direct part markingYes — laser/dot-peen friendlyRarely, and at larger sizes

About this Data Matrix reader

The ReadBarcode Data Matrix reader decodes 2D Data Matrix codes — including GS1 DataMatrix — directly in your browser. Use your phone camera, your webcam, or upload an image file. There's no app to install, no signup, and no upload step: the image stays on your device and is processed locally with a WebAssembly build of ZXing.

Data Matrix is the workhorse 2D symbology for healthcare, manufacturing, and logistics, where space is tight and codes must survive being marked directly onto parts. This online Data Matrix reader is built specifically for those workflows.

When to use it

  • Reading a GS1 DataMatrix on a pharmaceutical pack to confirm the GTIN, batch, expiry and serial.
  • Decoding a direct-part-marked Data Matrix on an electronics component or aerospace part.
  • Scanning a unit-load logistics label that carries a Data Matrix instead of a Code 128.
  • Auditing what a freshly generated Data Matrix actually encodes before mass production.
  • Quickly checking a small Data Matrix on a coupon, ticket, or appointment slip.

How it works

  1. Pick an input

    Choose the camera, an uploaded image, or paste a URL to an image of the Data Matrix code.

  2. Frame the code

    Fill the frame with the Data Matrix square. Even lighting beats high resolution every time.

  3. Auto-decode

    The ZXing engine detects the L-shaped finder pattern and reads the modules.

  4. Inspect the payload

    The result panel shows the detected format (Data Matrix) and the decoded text.

  5. Parse further if needed

    For GS1 DataMatrix payloads, pass the value to the GS1 Digital Link Decoder to split it into AIs.

What to avoid

  • Scanning glossy direct-part marks with a single point light source — the glare wipes out modules.
  • Digital-zooming on a small Data Matrix; move closer instead so each module stays crisp.
  • Cropping away the quiet zone around the code — most failures are quiet-zone failures.
  • Expecting product names or batch metadata — this is a decoder, not a healthcare database.
  • Confusing a tiny QR code for a Data Matrix. QR has three corner finder squares; Data Matrix has one solid L.

Tips & tricks

  • Diffuse, indirect light gives the best contrast on metal or foil packaging.
  • For very small codes, take the photo first at maximum resolution, then upload it here.
  • If the result starts with the GS1 FNC1 indicator, treat it as GS1 DataMatrix and parse the AIs.
  • When a code refuses to scan, try rotating the image 90° — Data Matrix is orientation-agnostic but the camera autofocus isn't.
  • Use the same tool to audit suppliers' Data Matrix codes before integrating them into your packing line.

Frequently asked questions

What's the difference between Data Matrix and QR code?
Both are 2D matrix barcodes, but Data Matrix is denser per square millimeter and is the default for very small marks — pharmaceutical blister packs, electronics components, and direct-part-marked metal. QR codes are tuned for fast camera scanning at a distance, which is why they dominate consumer-facing uses like posters and Wi-Fi sharing.
Can this reader decode GS1 DataMatrix?
Yes. GS1 DataMatrix is a Data Matrix code that carries GS1 Application Identifiers (AIs) such as (01) GTIN, (10) batch, (17) expiry, (21) serial. This reader returns the raw decoded payload. To split it into individual AIs, paste the result into the GS1 Digital Link Decoder.
Why won't my direct-part-marked Data Matrix scan?
DPM codes etched into metal often need controlled lighting (diffuse or dome) to produce enough contrast. The reader uses your phone or webcam image as-is, so a flat, evenly lit, high-contrast photo decodes far more reliably than a glare-heavy snapshot.
Is it safe to scan pharmaceutical Data Matrix codes here?
Decoding runs entirely in your browser via a WebAssembly build of ZXing. The image is never uploaded and the decoded value isn't logged or stored — useful when scanning serialized medicine codes that could contain a unique batch and serial.
Does the Data Matrix reader support rectangular (DMRE) codes?
It decodes the standard square Data Matrix and the common rectangular variants used on small components. Extremely high-density custom DMRE sizes may need a sharper close-up — frame the code tightly and avoid digital zoom.
Can I scan a Data Matrix from a screen?
Yes, but reduce screen brightness slightly to limit glare and keep the code sharp in the frame. If the camera struggles, screenshot the code and use the image upload option instead.

Related tools