Data Matrix Barcode Explained
Data Matrix (also "Datamatrix") is a two-dimensional or matrix code that can encode up to 3,000 characters. Several versions of Data Matrix exist; the only version relevant today is Data Matrix ECC200. The code supports square and rectangular layouts; the square versions need less space and are the preferred forms of the code.
Data Matrix has no distinct finder patterns like other 2D barcodes (e.g. Aztec or QR) and is therefore a very compact code, see below for a comparison.
What is Data Matrix used for?
The compact size (at least with small amounts of data) makes Data Matrix a popular choice for the tagging and labelling of small parts, like electronic components or jewellery.
Here's an example, the PCB from an Apple Watch 7, note fingers for scale (source):
The image shows Data Matrix codes on two chips near the top of the PCB. Data Matrix can also be created inverted (or "negative"), with light dots on a dark background. Such a code can be seen to the lower left of the former two codes. Note: Check your scanner if inverted codes are supported before using such codes in production.
Other applications of Data Matrix include healtcare (as HIBC and PZN), manufacturing and logistics, retail (as Data Matrix GS1) and for postage as a replacement for stamps.
Data Matrix SpecificationsData Matrix is standardized. The relevant standard is ISO/IEC 16022-2006 and can be obtained from ISO.
Sample Data Matrix BarcodeExample Data Matrix encodes "ABCabc123":
Data Matrix can directly encode accented and diacritic characters like german umlauts. Sample code encodes "ÄÖÜäöü":
This code has been verified to scan properly on Mac and Windows PCs. Check the settings of your scanner if the scan result is different or if the code doesn't scan at all.
Common problems when scanning Data Matrix with non-ASCII data:
Data Matrix vs QR Code
We've seen above that Data Matrix is very compact, compare to a QR code with identical data ("1234567890") and module size (1mm):
Of course, symbol size and space requirements are only one aspect when choosing a barcode type; QR has several advantages over Data Matrix:
Data Matrix Decoder
The specs linked to above contain a reference decoding algorithm for Data Matrix. For a quick test, the Zxing Online Decoder can be used to read a Data Matrix; here's the decoded result from the code in the "QR vs Data Matrix"-screenshot above.
Read Data Matrix with a Smartphone
For smartphones, a variety of barcode reader apps support reading Data Matrix, search the respective App Store. Our suggestion for Android smartphones is the free Zxing Barcode Reader which reads Data Matrix and many other codes.
Create Data Matrix Barcodes in Illustrator, InDesign
Easy to use 2D barcode plug-ins and extensions for Adobe InDesign, Illustrator und Photoshop. For more videos, see the Softmatic Youtube Channel
The Softmatic barcode plug-ins and extensions for InDesign, Illustrator and Photoshop are available on the Adobe Exchange.
Stand-alone Data Matrix GeneratorSoftmatic BarcodePlus V5 creates Data Matrix ECC 200 and will export the barcode as PDF / SVG (resolution-independent vector) oder raster image (PNG, TIFF). The app will automatically format the data according to the specs to create the smallest possible symbol:
Data Matrix mass creationFor mass creation of Data Matrix and other 2D barcodes, see Softmatic BarcodeFactory V5. Ideal for personalized 2D codes for tickets, event, mailings. Video shows generating bulk QR codes from email addresses: