---
title: "Data Matrix Generator – Free 2D Barcode, PNG & SVG"
description: "Free Data Matrix code generator. Turn text, numbers or URLs into an ECC 200 Data Matrix barcode and download PNG, SVG, JPG or PDF. No sign-up, no watermark."
url: https://barcodejar.com/data-matrix-generator
source: BarcodeJar (free barcode tools)
---

# Data Matrix Generator

Create a Data Matrix code from any text, number or URL. It is the small square 2D barcode used to mark electronics, medical devices and parts. The size is picked automatically and downloads are free.

_Interactive tool: open https://barcodejar.com/data-matrix-generator to use it in your browser. It is free with no sign-up._

## How to create a Data Matrix barcode

1.  Enter your data in the box above. Any text, including lower case, symbols and UTF-8 characters. Up to 3,116 digits or 2,335 alphanumeric characters. The symbol size is chosen automatically.
2.  The barcode updates live as you type. Open **Customize** to change the bar height, colors, rotation or quiet zone.
3.  Click **Download PNG** for labels and documents, or **SVG / PDF** for print and packaging design.
4.  Test it with our [online barcode scanner](https://barcodejar.com/barcode-scanner) before you print a large run.

## What is a Data Matrix barcode?

A **Data Matrix** code is a two-dimensional barcode made of black and white square cells arranged in a square or rectangle. You can recognise it by the solid L-shaped border on two sides (the finder pattern) and the alternating dotted border on the other two (the timing pattern).

The modern version, **ECC 200**, uses Reed-Solomon error correction, so a code can still be read when part of it is scratched or smudged. Data Matrix can be printed or laser-etched very small, which makes it the standard for marking parts, circuit boards and medical devices. GS1 uses it for healthcare and retail traceability as [GS1 DataMatrix](https://barcodejar.com/gs1-datamatrix-generator).

## Where Data Matrix is used

-   Electronic components and printed circuit boards
-   Direct part marking (laser, dot peen) in aerospace and automotive
-   US Department of Defense UID marking (MIL-STD-130)
-   Pharmaceutical packs and medical devices (as GS1 DataMatrix)
-   Postage indicia and franking marks
-   Small labels where a QR code would be too big

## Data Matrix specifications

-   **Type:** 2D matrix
-   **Characters:** Full ASCII and extended byte data (UTF-8 supported)
-   **Capacity (max):** 3,116 digits, 2,335 alphanumeric characters or 1,556 bytes
-   **Square sizes:** 10 × 10 to 144 × 144 modules (24 sizes)
-   **Rectangular sizes:** 8 × 18 to 16 × 48 modules (6 sizes)
-   **Error correction:** Reed-Solomon (ECC 200), fixed by symbol size
-   **Quiet zone:** At least 1 module on all sides
-   **Standard:** ISO/IEC 16022

## Tips for a barcode that scans first time

-   Short data gives larger cells at the same printed size, which scans more easily.
-   Keep each cell at least about 0.25 mm for printed labels, and bigger for rough surfaces or low-resolution printers.
-   Print dark on light where you can. Many scanners can read inverted (light on dark) Data Matrix, but not all.
-   For GTINs, batch numbers and expiry dates on products use [GS1 DataMatrix](https://barcodejar.com/gs1-datamatrix-generator), which adds the required FNC1 and Application Identifiers.

## Frequently asked questions

### How much data can a Data Matrix hold?

Up to 3,116 digits, 2,335 alphanumeric characters or 1,556 bytes in the largest 144 × 144 symbol. Most real uses store far less, such as a serial number of 10 to 30 characters, which fits in a code a few millimetres across.

### What is the difference between Data Matrix and a QR code?

Both are 2D codes. Data Matrix has an L-shaped border and is more compact for small amounts of data, so it is preferred for tiny marks on parts and packaging. A [QR code](https://barcodejar.com/qr-code-generator) has three corner squares and is better for consumer use, since every phone camera reads it.

### Can phones scan Data Matrix codes?

Many can, through barcode scanning apps and some built-in camera features. Support is less universal than for QR codes. You can test any code with our [online barcode scanner](https://barcodejar.com/barcode-scanner).

### What is ECC 200?

ECC 200 is the current version of Data Matrix, with Reed-Solomon error correction. Older versions (ECC 000 to 140) are obsolete. All Data Matrix codes made here are ECC 200.

### What is the difference between Data Matrix and GS1 DataMatrix?

[GS1 DataMatrix](https://barcodejar.com/gs1-datamatrix-generator) is a Data Matrix that starts with a special FNC1 character and holds GS1 Application Identifiers, such as (01) GTIN, (17) expiry and (10) batch. Use it on regulated products. Use plain Data Matrix for your own internal data.

### How small can a Data Matrix be printed?

The smallest symbol is 10 × 10 modules. With cells of about 0.25 mm that is around 3 mm square including the quiet zone. Reliable size depends on your printer and scanner, so test before a large run.

## Related free tools

[![GS1 Data Matrix Generator example](/thumbs/gs1datamatrix.svg)**GS1 Data Matrix Generator**Create GS1 Data Matrix barcodes free. PNG, SVG, PDF.](https://barcodejar.com/gs1-datamatrix-generator)[![Data Matrix Rectangular Generator example](/thumbs/datamatrixrectangular.svg)**Data Matrix Rectangular Generator**Create Data Matrix Rectangular barcodes free. PNG, SVG, PDF.](https://barcodejar.com/rectangular-data-matrix-generator)[**QR Code Generator**Free static QR codes with colors and logo. No sign-up.](https://barcodejar.com/qr-code-generator)[![PDF417 Generator example](/thumbs/pdf417.svg)**PDF417 Generator**Create PDF417 barcodes free. PNG, SVG, PDF.](https://barcodejar.com/pdf417-generator)[![Aztec Code Generator example](/thumbs/azteccode.svg)**Aztec Code Generator**Create Aztec Code barcodes free. PNG, SVG, PDF.](https://barcodejar.com/aztec-code-generator)[![HIBC Data Matrix Generator example](/thumbs/hibcdatamatrix.svg)**HIBC Data Matrix Generator**Create HIBC Data Matrix barcodes free. PNG, SVG, PDF.](https://barcodejar.com/hibc-data-matrix-barcode-generator)[**Online Barcode Scanner**Scan any barcode with your phone or webcam camera.](https://barcodejar.com/barcode-scanner)[**QR Code vs Barcode**1D vs 2D codes and which to choose.](https://barcodejar.com/guides/qr-code-vs-barcode)
