xBarcodexBarcode
ISO ISO/IEC 16022:2006

Data Matrix Barcode Generator & Standard

A two-dimensional matrix barcode consisting of black and white 'cells' or modules arranged in either a square or rectangular pattern. Widely used for marking small items.

Live Generator
22/500

Completes check digits when their position is clear. Use parenthesized AIs for GS1. Existing check digits are validated. Other formats keep their usual behavior.

FG
BG
🛡️Zero Data Retention: Encoded in edge memory. Never logged or stored.

Technical Specifications

Structure L-shaped Finder Pattern + Clock Track + Data Region
Capacity Numeric: 3,116 chars, Alphanumeric: 2,335 chars
Character Set ASCII, ISO-8859-1
Quiet Zone Requirement ≥ 10x module width (Standard quiet zone)

Common Applications

This standard is widely used in the following industries:

Electronics, Automotive, Aerospace, Medical Instruments
Input Constraints & Parity: Engineered with Reed-Solomon Forward Error Correction (ECC) to tolerate physical damage, smudging, or partial occlusion. Configurable ECC levels ensure maximum scan reliability in high-speed sorting.
Developer Quickstart

Automate Data Matrix via API

Full API Reference →
curl -X POST https://api.xbarcode.ai/v1/render \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "format": "data_matrix",
  "content": "Data Matrix | Powered by https://xbarcode.ai"
}' > barcode.svg
API outputs: SVG, PDF, EPS and matrix JSON. PNG is exported in the browser. < 20ms Edge latency

⚡ The Science Inside

How our Rust engine optimizes this specific format:

DP encoder spans all ISO 16022 modes to minimize codewords (ASCII/C40/Text/X12/EDIFACT/Base256).

  • O(1) character mapping via precomputed tables accelerates C40/Text/X12/EDIFACT packing.
  • ASCII mode includes double-digit compression (00-99 -> one codeword) and GS1 FNC1 mapping (0x1D -> 232).
  • Base256 is emitted unrandomized during DP, then randomized post-pass per codeword position (spec-compliant and localized to Base256 segments).
  • Symbol selection respects square/rectangular preference with clear capacity errors and spec padding (129 + pseudo-random pads).
  • Reed-Solomon ECC is cached (GF(256)) and interleaves blocks, handling long/short blocks for large symbols.
  • Utah + corner placement implements standard module mapping before region framing is applied.
Related Standards

Alternative Symbologies related to Data Matrix

Need an Industry-Grade Solution?

Explore how xBarcode powers retail GTIN, shipping labels, and GS1 Digital Link migration.