Data Matrix Barcode Generator

Create compact Data Matrix codes for small items, electronics, and documents.

Any text or binary data (up to 2,335 characters)

Need a different barcode type? Browse all generators

What is a Data Matrix Barcode?

Data Matrix is a two-dimensional barcode that can store large amounts of data in a compact square or rectangular pattern. It uses built-in error correction (Reed-Solomon) to remain readable even when partially damaged. Data Matrix codes are commonly found on small electronic components, circuit boards, and in pharmaceutical packaging.

Data Matrix was invented by RVSI Acuity CiMatrix in the late 1980s and became an ISO standard (ISO/IEC 16022) in 2000. Its ECC 200 error correction can recover data even when portions of the symbol are damaged, making it reliable in harsh industrial environments. Data Matrix is the only 2D barcode approved for direct part marking (DPM) on metal, glass, and plastic components in aerospace and electronics manufacturing, where it is often laser-etched or dot-peened directly onto the surface.

Want to learn more about Data Matrix barcodes? Read our complete guide to Data Matrix for electronics applications, healthcare uses, and implementation best practices.

How to Use This Generator

Creating a Data Matrix code is straightforward:

  1. Enter your data (text, numbers, or binary data up to 2,335 characters)
  2. Click 'Generate Barcode' to create your Data Matrix code
  3. Customize size and colors in advanced options (optional)
  4. Download your code as SVG, PNG (multiple resolutions), or PDF

Technical Specifications

Key technical details for Data Matrix:

Data CapacityUp to 2,335 alphanumeric characters, 3,116 numeric digits, or 1,556 bytes of binary data
Character SetFull ASCII, extended ASCII, and binary data
Symbol SizeSquare: 10x10 to 144x144 modules; Rectangular (DMRE): various sizes per ISO/IEC 21471
Check DigitNot applicable — error correction is handled by Reed-Solomon coding
Error CorrectionECC 200 (Reed-Solomon) — recovers data with up to ~25% symbol damage
StandardISO/IEC 16022 (square); ISO/IEC 21471 (rectangular DMRE extension)

Common Use Cases

Data Matrix codes are perfect for:

  • Electronics marking and component identification (PCBs, semiconductors)
  • Pharmaceutical packaging and medical device tracking
  • Document management and small item labeling where space is limited
  • Aerospace direct part marking (DPM) on engine components and structural parts
  • Postal and mail sorting with compact machine-readable codes

Tips & Best Practices

Get the most out of your Data Matrix codes:

  • Choose the smallest symbol size that fits your data — Data Matrix automatically selects the optimal size, and smaller symbols are easier to print and mark on tiny components.
  • For direct part marking (laser etching or dot peening), ensure at least 20% contrast between the symbol and the substrate surface for reliable reading.
  • Always verify your Data Matrix codes against ISO/IEC 15415 grading standards before production, especially for regulated industries like pharmaceuticals and aerospace.
  • Include a quiet zone of at least 1 module width on all four sides of the symbol — though Data Matrix requires smaller margins than most barcodes, skipping them entirely causes scan failures.

Test Your Data Matrix Code

After generating your Data Matrix code, verify it scans correctly even at small sizes before production. Use our free barcode scanner to test your codes instantly - simply scan with your camera or upload an image to ensure proper encoding and readability. Test your Data Matrix code with our free scanner.

Frequently Asked Questions

What is the difference between Data Matrix and QR code?

Data Matrix and QR Code are both 2D barcodes, but they serve different primary purposes. Data Matrix uses a square or rectangular pattern with an L-shaped finder and is optimized for small, high-density marking on industrial parts and electronics. QR Code uses three large finder squares and is designed for fast scanning by smartphone cameras. QR Code holds more data at larger sizes, while Data Matrix is more space-efficient at very small print sizes.

Can Data Matrix be rectangular?

Yes. The original Data Matrix standard supports only square symbols (from 10x10 to 144x144 modules). However, the Data Matrix Rectangular Extension (DMRE), added in ISO/IEC 21471, introduces rectangular formats that fit narrow spaces like test tubes, vials, and small PCBs. Our generator supports standard square Data Matrix symbols.

How much data can a Data Matrix code store?

A single Data Matrix symbol can store up to 2,335 alphanumeric characters or 3,116 numeric digits. It also supports up to 1,556 bytes of binary data. The actual capacity depends on the symbol size you choose — smaller symbols hold less data. For typical industrial marking, most codes encode 20-50 characters, well within capacity.

Is Data Matrix used in healthcare?

Yes, Data Matrix is the dominant barcode in healthcare and pharmaceuticals. The EU Falsified Medicines Directive (FMD) and US FDA UDI rules require Data Matrix (specifically GS1 Data Matrix) on drug packaging and medical devices for traceability and anti-counterfeiting. Its small size and strong error correction make it ideal for vials, syringes, and surgical instruments.

What is ECC 200 in Data Matrix?

ECC 200 is the current and only recommended error correction method for Data Matrix, using Reed-Solomon codes. It can recover data even if up to 25% of the symbol is damaged or obscured. Older ECC levels (000 through 140) used convolutional coding and are now obsolete. All modern Data Matrix symbols, scanners, and generators use ECC 200 exclusively.

Is this Data Matrix generator free?

Yes, this Data Matrix generator is completely free with no limits, no registration, and no watermarks. Generate as many Data Matrix codes as you need and download them as SVG, PNG, or PDF. All processing happens locally in your browser — no data is sent to any server, which is especially important for sensitive industrial or healthcare data.

Related Barcode Formats