Data Matrix reader: decode any code online

Drop an image, paste a screenshot or use your camera. Decoding happens on your device, so your data never leaves it.

Drop an image, paste a screenshot or use your camera. Nothing is uploaded.

Drop an image of the code hereRead a code from a photo

or paste a screenshot (Ctrl+V or ⌘V)Choose a photo, take one, or paste a screenshot.

Decoded on your device. Nothing is uploaded.

Reader options

Your result shows here

The exact text, GS1 fields, bytes and symbol size of every Data Matrix in the image.

What the reader does

  • Nothing uploaded

    Images are decoded on your device and never leave it.

  • Image or camera

    Drop, paste or choose a picture, or scan live with your phone.

  • GS1 fields explained

    Each field with its name, value, readable date and check digit.

  • The exact data

    Hidden characters, bytes as hex, symbol size and character set.

How to read a Data Matrix code

A Data Matrix is a 2D code: a square or rectangle of small black and white squares (modules) with an L-shaped solid border on two sides. It has to be read by a camera-based (2D) reader. A 1D laser scanner can’t read it, whatever its settings.

  1. Step 1: Add the code

    Choose a photo or screenshot, drop it on the reader, paste it with Ctrl+V (⌘V on a Mac), or start the camera.

  2. Step 2: The reader finds every code

    All Data Matrix codes in the picture are read, at any angle, light on dark or dark on light, and outlined on the image.

  3. Step 3: Copy or reuse the result

    Copy the text exactly, check the GS1 fields, or open the same data in the generator with “Make this code”.

With your phone

Open this page in your phone’s browser, tap Camera, then Start camera. Your browser asks for permission first. Hold the phone so the code fills about half of the square guide; the reader stops as soon as it has a result. A scanner app that supports Data Matrix works too. Some built-in camera apps only look for QR codes.

With a barcode scanner

Use a 2D imaging scanner (often sold as a “2D imager” or “area imager”). Codes etched or dot-peened into metal (direct part marking) can need an industrial reader with its own lighting. For production lines, use a fixed 2D reader rather than a phone.

What the result means

Text
The data exactly as stored. Invisible characters are shown as small gray tags: GS is the group separator that splits GS1 fields, CR LF are line breaks, and spaces at the start or end are marked. Copy copies the real characters, not the tags.
Symbol size
Rows × columns of modules, such as 24 × 24 or 16 × 48. Square sizes run from 10 × 10 to 144 × 144; rectangles from 8 × 18 to 16 × 48. Longer rectangles marked DMRE (ISO/IEC 21471) are newer and not every scanner reads them.
Symbology identifier
A short code a scanner sends before the data. ]d1 is a plain Data Matrix (ECC 200), ]d2 is GS1 DataMatrix, ]d3 is AIM application data, and ]d4 to ]d6 are the same three with a character-set marker (ECI).
Character set
How bytes become letters. Plain ASCII needs nothing. Accented letters with no marker are read as ISO-8859-1, the Data Matrix default. An ECI marker such as ECI 26 (UTF-8) tells the scanner exactly which set to use.
Bytes as hex
Every byte in the code, in hexadecimal. Use it to check data exactly, for example to spot a stray space (20) or a GS separator (1D).
Error correction used
How much of the code’s built-in error correction the read needed. 0% means a clean read; a high number means damage, blur or glare. It is a rough guide from the decoder, not a print-quality grade (that needs an ISO/IEC 15415 verifier).

Reading GS1 DataMatrix

A GS1 DataMatrix starts with a special FNC1 character, so the scanner reports ]d2. The data is a chain of GS1 Application Identifiers (AIs): a number in brackets that says what follows, such as (01) for the product’s GTIN or (17) for the expiry date. The brackets are printed under the code for people; they are not in the code itself. A field whose length varies, such as a batch number, ends with a separator that scanners send as the GS character, shown here as GS.

The sample code on this page holds this data, as a scanner sends it:

01095060001343521728123110ABC123GS21SN000417

The reader splits it into fields like this:

AI Field Value Reads as
(01) Product number (GTIN) 09506000134352 GTIN-13 (EAN) 9506000134352, check digit correct
(17) Expiry date 281231 31 Dec 2028
(10) Batch or lot number ABC123 —
(21) Serial number SN000417 —

For each field the reader shows its name, the value, a readable date or measure, and whether the check digit is correct. It checks the syntax of every field against the GS1 Barcode Syntax Dictionary. It can’t tell you whether a GTIN is registered or who owns it. Learn what the GS1 fields mean, or make your own with the GS1 DataMatrix generator.

If a code shows GS1-looking text with the brackets inside it, such as “(01)0950…”, it was made as a plain Data Matrix. GS1 scanners will not split it into fields. The reader warns you and offers to make a real GS1 DataMatrix with the same data.

Private by design

Many online readers upload your image to a server. This one doesn’t. The decoder is zxing-wasm, a WebAssembly build of the open-source ZXing-C++ library, and it is served from this site. Your browser opens the image, the decoder reads it on your device, and the result stays on the page. Camera video is decoded frame by frame in the same way and is never recorded or sent. After the decoder has loaded once (about 1 MB), reading works without a connection.

We count only anonymous events, such as “a code was read from an upload”, never the decoded data or the image. See the privacy policy.

Tips if a code won’t read

  • Get closer. Crop the photo or zoom in so the code fills a good part of the picture. Each small square needs a few pixels.
  • Keep it sharp. Hold still, let the camera focus, and avoid motion blur. A screenshot of a PDF works better than a photo of a screen.
  • Light it evenly. Avoid glare on glossy labels and shadows across the code. On metal, tilt the part slightly to lose reflections.
  • Keep the blank border. The quiet zone (the empty margin around the code) must be in the picture and clear of text or edges.
  • Check the options. Light-on-dark codes and rotated images are on by default. Turn on “Also read other codes” if it may be a QR code.
  • Etched or dot-peened parts (direct part marking) can be beyond a phone camera. An industrial 2D reader with the right lighting reads them.

Still stuck? Fix a Data Matrix that won’t scan. If you made the code yourself, create a Data Matrix code again at a larger size with at least a 2-module blank border.

Data Matrix reader FAQ

How can I read a Data Matrix code?

Upload or paste a photo of it on this page, or point your camera at it with “Camera”. You can also use a 2D barcode scanner app on your phone, or a 2D imaging scanner. A 1D laser scanner can’t read Data Matrix: it only sweeps a line, and a Data Matrix has to be seen as a whole picture.

Is there an online reader that can scan Data Matrix codes?

Yes, this page. It’s free, needs no sign-up, and reads images and live camera video in your browser. It shows the decoded text, the bytes, the symbol size and, for GS1 DataMatrix, every field. Nothing you scan is uploaded.

How do I decode a Data Matrix code?

Decoding is the same as reading: give the reader a clear image and it turns the pattern of squares back into the data. The result shows the text (with invisible characters such as the GS separator made visible), the bytes as hex, the symbology identifier (for example ]d2 for GS1), the character set and the size in rows × columns. If the code holds GS1 data, each field is listed with its meaning. See what the GS1 fields mean.

Is there an app that can read Data Matrix codes?

Many 2D barcode scanner apps read Data Matrix: check that the app lists Data Matrix among its supported codes. You don’t need to install anything to use this page: open it in your phone’s browser and tap “Camera”. We don’t recommend particular apps because we haven’t tested them.

Why can’t my phone camera read a Data Matrix?

Built-in camera apps are made mainly for QR codes, and some ignore other 2D codes such as Data Matrix. Use this page or a scanner app that supports Data Matrix. If a scanner app still fails, the cause is usually the photo or the print: too small, blurry, shiny or missing its blank border. Our guide to codes that won’t scan covers the fixes.

Are my images uploaded?

No. The image is opened by your browser and decoded on your device with a WebAssembly decoder that this site serves. Camera frames are decoded the same way and never recorded or sent. We count only that a code was read and how (upload, paste, drop or camera), never what it says.