Data Matrix
Free text, line breaks and, with escape sequences on, control characters: for part numbers, serial numbers and label messages.
Create Data Matrix ›New: TFORMer Designer V9.2 — easily design and print labels and forms. Explore the product →
Used by 700,000+ people
Data Matrix is the small square 2D code on electronic components, metal parts and EU medicine packs. Enter text, numbers or a web address and download the symbol.
Type text or numbers in Latin-1 characters, or pick URL (Semacode) for a web address. For control characters such as the group separator (GS), turn on escape sequences and write \x1D.
Enter your printer's resolution and a module width in whole printer dots, such as 0.339 mm (4 dots) at 300 dpi. Set the quiet zone to one module, here 0.339 mm, or the image ends at the symbol edge.
Download PNG and scan a test print with a camera-based imager; most laser scanners cannot read Data Matrix. For EU medicine packs, have a verifier grade it as well.
A Data Matrix code is a 2D barcode of square modules inside an L-shaped finder pattern, defined in ISO/IEC 16022. Its current version, ECC 200 (error checking and correction), holds up to 3,116 digits or 1,556 bytes. It needs only a one-module quiet zone (clear margin) and repairs damage with Reed-Solomon codewords. That suits marks on metal parts, component labels and EU medicine packs, where regulation requires it.
On automotive transport labels, TEC-IT's VDA 4994 templates and its GM 1724 templates from 2018 put part number, quantity and package ID into one Data Matrix message. TEC-IT's VDA 4992 MAT label templates encode part numbers, date code and moisture sensitivity level.
The U.S. Department of Defense (DoD) requires Data Matrix ECC 200 for item unique identification (IUID) marks, on labels or directly on the part. EU prescription medicine packs with safety features carry their unique identifier in a Data Matrix, checked when the pack is dispensed. Royal Mail Mailmark 2D codes use it too.
A 20 × 20 symbol holds 44 digits and measures 5.5 mm with its one-module quiet zone, at 0.25 mm per module. It reads in any orientation. Reed-Solomon error correction, 27.6–62.5% of each symbol's codewords, rebuilds data lost to print defects, reflections or wear.
Print defects use up part of the error correction, so print cleanly: whole printer dots, dark on light matte, quiet zone empty. An ISO/IEC 15415 verifier grades the result from 4 (highest) to 0. For EU medicine packs, 1.5 is presumed sufficient; U.S. DoD marks graded this way need 3.0.
The online generator delivers PNG, GIF and JPG, and SVG vector files with a plan. It picks a square symbol to fit the data. TEC-IT's software can set a fixed size instead, including rectangular and DMRE (Data Matrix Rectangular Extension) formats.
For serial numbers, Barcode Studio generates the sequence or imports a CSV list and exports the batch, also by command line. TBarCode Office ties a Data Matrix to an Excel cell or Word mail merge field; TBarCode SDK builds it into .NET, COM and DLL applications. For CAPTIVA and IBML document capture, TEC-IT's software has a compatibility mode.
The solid L along two edges is the finder pattern; the alternating modules on the other two edges form the clock track. In ECC 200 the corner opposite the L is light.
Data becomes 8-bit codewords, two digits per codeword in ASCII mode.
A Data Matrix holds any text, so the application standard defines the syntax. TEC-IT's VDA 4994, GM 1724, Bosch GTL and Autoliv templates start with [)>, the ISO/IEC 15434 compliance indicator, then a record separator (RS) and format 06. The group separator (GS) divides the fields; RS and end of transmission (EOT) close the message.
| Format | Field identifiers | Used by |
|---|---|---|
| 06 | Data identifiers, e.g. P part number, Q quantity | TEC-IT automotive templates; DoD marks |
| 05 | GS1 Application Identifiers (AIs) | DoD marks; not used in GS1 standards |
| 12 | Text element identifiers of the aviation Spec 2000 | DoD marks |
Online, turn on escape sequences and type RS, GS and EOT as \x1E, \x1D and \x04. For part number 12345 and quantity 100 in format 06, type [)>\x1E06\x1DP12345\x1DQ100\x1E\x04. TEC-IT's software adds header and trailer with the Macro 06 code format.
Edge length with quiet zone = (modules per side + 2) × module width.
| Printer resolution | Module width (printer dots) | 22 × 22 symbol with quiet zone |
|---|---|---|
| 203 dpi | 0.375 mm (3) | 9.0 mm |
| 203 dpi | 0.500 mm (4) | 12.0 mm |
| 300 dpi | 0.339 mm (4) | 8.1 mm |
| 300 dpi | 0.423 mm (5) | 10.2 mm |
| 600 dpi | 0.254 mm (6) | 6.1 mm |
| 600 dpi | 0.508 mm (12) | 12.2 mm |
\x1D with escape sequences off. It is encoded as four ordinary characters, not a separator. Turn the option on and write \\ for one backslash.GS1 DataMatrix starts with the Function 1 character (FNC1), so scanners report ]d2, and carries GS1 Application Identifiers for Global Trade Item Number (GTIN), batch and expiry data.
QR Code needs a four-module quiet zone, lets you choose the error correction level and holds up to 7,089 digits instead of 3,116.
PDF417 stacks rows of bars and spaces and needs a two-module quiet zone. TEC-IT's GM 1724 templates use it in the 2001 versions, Data Matrix from 2018.
Aztec Code needs no quiet zone and lets you set the error correction share; its smallest symbol has 15 × 15 modules, against 10 × 10.
Health Industry Bar Code (HIBC) is a data format, not a symbology; HIBC LIC Data Matrix carries it.
DotCode was designed for high-speed inkjet and laser dot printing, needs a three-module quiet zone and has no absolute capacity limit.
Both presets create the same ECC 200 symbol; only the input differs.
Free text, line breaks and, with escape sequences on, control characters: for part numbers, serial numbers and label messages.
Create Data Matrix ›A web address field instead of free text; the address is encoded unchanged. Semacode is an older mobile-marketing name for Data Matrix. For GS1 Digital Link addresses, use the GS1 Digital Link Data Matrix type.
Create URL (Semacode) ›Learn more about Data Matrix.
Data Matrix is a two-dimensional matrix barcode, which encodes text or raw data in a pattern of black and white square modules. Usual data size is from a few…
GuideCreate these barcodes with TEC-IT software: Barcode Studio – barcode maker for Windows, macOS and Linux
ProductThe developer package for Windows: .NET, OCX and DLL components generate and print 100+ barcode symbologies from your applications.
Product100+ barcode types, a live quality check and batch export.
ProductAdd compliant barcodes to documents, mail merges and spreadsheets.
Try it free in the browser, download a full trial, or talk to sales about your systems, standards and volume.
We use cookies for marketing and to improve your experience. Read our Cookie Policy or manage cookies.