Data Matrix code
examples

Every code here is real and scans. Download them, print the test sheet, or open any one in the generator.

Updated 6 min read By the Data Matrix Code Generator team

On this page 8 sections
  1. Short answer
  2. Everyday examples
  3. GS1 DataMatrix example
  4. Size examples: 10 × 10 to 144 × 144
  5. Rectangular and DMRE examples
  6. Printable scanner test sheet
  7. Data Matrix icon (decorative)
  8. FAQ

Short answer

Data Matrix code example encoding PART-000123 (14 × 14, ECC 200)

Here are real Data Matrix codes you can scan or download: a part number, a serial number, a web address, a GS1 product code with expiry and lot, a rectangular code and a tiny 10 × 10. Each shows the exact data inside, and all of them are ECC 200. The code shown here encodes PART-000123.

All samples (ZIP of SVG + PNG) What each code contains (CSV) Scanner test sheet (PDF)

Every image on this page was made by the same engine as our generator and checked by decoding it with independent software (zxing-cpp). The SVG files print at true size with 0.5 mm modules; the PNG files are 10 pixels per module, tagged 300 dpi. Want your own data instead? Make your own Data Matrix code; it takes a few seconds and no sign-up.

Everyday examples

The kinds of codes people make most. All are plain Data Matrix: the text you see is exactly what a scanner returns, character for character.

Data Matrix code example encoding Größe M – 5 € (22 × 22, ECC 200)

Text with accents and symbols

The en dash and € are outside Latin-1, so the whole text is stored as UTF-8 with an ECI marker that tells the scanner so. Accented letters alone (é, ö, ß) are stored as single Latin-1 bytes with no marker.

Encoded text
Größe M – 5 €
Size
22 × 22 modules
Data
19 bytes, UTF-8 with ECI 000026

SVG prints at 13 × 13 mm including its 2-module quiet zone (code 11 × 11 mm, 0.5 mm modules); PNG is 10 px per module.

Two details to notice. The six digits in the 10 × 10 code fit because Data Matrix stores two digits per codeword; letters cost more. The web address works, but phone cameras open links from QR codes more readily; see Data Matrix vs QR code before you choose. And the accented text carries a small marker (ECI 000026) saying “this is UTF-8”, because of the – and € (accented letters alone, such as é or ö, are stored as Latin-1 bytes and need no marker). Most scanners honor it, but some older or web-based ones show the wrong characters, so test before you rely on it.

GS1 DataMatrix example

A GS1 DataMatrix is a Data Matrix whose content follows GS1 rules: it starts with an invisible FNC1 character and holds numbered fields called Application Identifiers. This one carries a product number (GTIN), an expiry date, a lot and a serial, the combination used on medicine packs.

GS1 DataMatrix code example encoding 01095060001343521728123110LOT42<GS>21SN1001 (22 × 22, ECC 200)

GS1 DataMatrix: GTIN, expiry, lot and serial

The pattern used on medicine packs and medical devices: product, expiry date, batch and serial in one code.

Printed under the code
(01)09506000134352(17)281231(10)LOT42(21)SN1001
Encoded (as a scanner outputs it)
01095060001343521728123110LOT42<GS>21SN1001
Size
22 × 22 modules
Data
40 bytes, GS1 (FNC1 first)

SVG prints at 13 × 13 mm including its 2-module quiet zone (code 11 × 11 mm, 0.5 mm modules); PNG is 10 px per module.

What each field means

Fields of the GS1 example (names from the GS1 Barcode Syntax Dictionary 2026-01-27)
AI Field Value
(01) Product number (GTIN) 09506000134352
(17) Expiry date 281231 31 Dec 2028
(10) Batch or lot number LOT42
(21) Serial number SN1001

The brackets in the printed line are for people and are not encoded. The lot is variable-length, so a group separator (shown as <GS>) ends it before the serial. Scanners report this code with the prefix ]d2. Read more in GS1 DataMatrix explained, or make one with the GS1 generator.

Size examples: 10 × 10 to 144 × 144

Each code below is filled to capacity with digits, the most compact kind of data, and all are drawn at the same module size, so you see their true proportions. The smallest holds 6 digits; the largest holds 3,116. Text with letters fits fewer characters.

  1. Data Matrix code example encoding 012345 (10 × 10, ECC 200)

    10 × 10

    6 digits

    SVG
  2. Data Matrix code example encoding 012345678901234567890123 (16 × 16, ECC 200)

    16 × 16

    24 digits

    SVG
  3. Data Matrix code example encoding 012345678901234567890123456789012345678901234567890123456789012345678901 (24 × 24, ECC 200)

    24 × 24

    72 digits

    SVG
  4. Data Matrix code example encoding 124 digits (32 × 32, ECC 200)

    32 × 32

    124 digits

    SVG
  5. Data Matrix code example encoding 348 digits (48 × 48, ECC 200)

    48 × 48

    348 digits

    SVG
  6. Data Matrix code example encoding 560 digits (64 × 64, ECC 200)

    64 × 64

    560 digits

    SVG
  7. Data Matrix code example encoding 1,392 digits (96 × 96, ECC 200)

    96 × 96

    1,392 digits

    SVG
  8. Data Matrix code example encoding 3,116 digits (144 × 144, ECC 200)

    144 × 144

    3,116 digits

    SVG
Real codes, same module size. Every size, square and rectangular, is in the sizes and capacity chart.

Rectangular and DMRE examples

Data Matrix also comes in rectangles, for narrow labels and the edges of parts. ECC 200 defines 6 of them (8 × 18, 8 × 32, 12 × 26, 12 × 36, 16 × 36, 16 × 48), and because they are part of the original standard, readers support them widely. A newer standard, DMRE (Data Matrix Rectangular Extension, ISO/IEC 21471), adds 18 more, up to 26 × 64.

Before you print DMRE codes in quantity, check that every scanner that will read them supports DMRE; some older ones do not. Code T9 on the test sheet below checks exactly that. The rectangular generator labels DMRE sizes clearly.

Printable scanner test sheet

One page, 12 codes, from a 3.5 mm code to a 32 mm rectangle: five module sizes (0.25 to 1.00 mm), square, rectangle, DMRE, GS1 and UTF-8. Print it to check a new scanner, a phone app or a printer, or to show a supplier what “must read” means. It is free to copy and share.

Data Matrix scanner test sheet (PDF, 1 page)

Vector PDF at exact size. Print at 100% (“Actual size”).

How to use it

  1. Print at 100%. Measure the bar at the top: it should be 100 mm (3.94 in). If not, turn off “Fit to page” and print again.
  2. Scan each code, at the distance and angle you will use for real.
  3. Compare what the scanner returns with the expected text below. A scanner set up as a keyboard may change or drop characters, so test in the app you will actually use.
  4. For T10, check that the scanner sends the group separator (ASCII 29) and, if your system needs it, the ]d2 prefix.
The 12 test codes and the exact text each should return
Code Size Tests Should read
T1 Part number 14 × 14 0.50 mm modules, 7 × 7 mm Baseline: a short code at a comfortable size. PART-000123
T2 Part number, smaller 14 × 14 0.33 mm modules, 4.6 × 4.6 mm Same data at 0.33 mm modules (13 mils). PART-000123
T3 Part number, small 14 × 14 0.25 mm modules, 3.5 × 3.5 mm Same data at 0.25 mm modules (about 10 mils): needs a sharp imager and a good print. PART-000123
T4 Smallest size 10 × 10 0.50 mm modules, 5 × 5 mm The 10 × 10 symbol. 123456
T5 Web address 22 × 22 0.50 mm modules, 11 × 11 mm Lowercase text and punctuation. https://example.com/p/PART-000123
T6 Full 32 × 32 32 × 32 0.40 mm modules, 12.8 × 12.8 mm Four data regions, filled to capacity with digits. 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
T7 Rectangle 8 × 32 0.50 mm modules, 16 × 4 mm A standard rectangular size. PART-000123
T8 Large rectangle 16 × 48 0.50 mm modules, 24 × 8 mm The largest standard rectangle. PART-000123 LOT 2611-A QTY 25
T9 DMRE rectangle 8 × 64 DMRE 0.50 mm modules, 32 × 4 mm An ISO/IEC 21471 size. A no-read here means your scanner lacks DMRE support. PART-000123 LOT 2611
T10 GS1 DataMatrix 22 × 22 0.50 mm modules, 11 × 11 mm FNC1 and a group separator. Check the GS character arrives and the scanner reports ]d2. 01095060001343521728123110LOT42<GS>21SN1001
T11 UTF-8 with ECI 22 × 22 0.50 mm modules, 11 × 11 mm Accents and the euro sign. Wrong characters mean the scanner ignores the ECI marker. Größe M – 5 €
T12 Part number, large 14 × 14 1.00 mm modules, 14 × 14 mm Same data at 1 mm modules, for long range or low-resolution cameras. PART-000123

The same text, with the exact bytes in hex, is in the CSV (one row per sample). A code that decodes here proves the symbol is correct, not that a printed copy is good enough: grading print quality takes an ISO/IEC 15415 verifier. Need your own codes on labels? Print labels on sheets or thermal rolls.

Data Matrix icon (decorative)

Need a Data Matrix symbol for a button, a menu or a slide? This SVG icon uses currentColor, so it takes the color of the text around it. It is a real 10 × 10 code that encodes just “DM”, so it never points anywhere, but it is meant as a picture, not for scanning. Free to use under CC0.

Download the icon (SVG)

Generated with engine v2.0.1. To check any of these codes yourself, save one and decode a sample in the reader; nothing is uploaded.

Frequently asked questions

Can you provide an example of data matrix code?
Yes. This page has 18 real examples: a part number, a serial number, a web address, a GS1 product code with expiry and lot, rectangular and DMRE codes, and every size from 10 × 10 to 144 × 144. Each shows the exact data inside and downloads as SVG or PNG.
What does a Data Matrix code look like?
A small square (or rectangle) of black and white squares. Two edges, the left and the bottom, are a solid black line forming an L; the other two edges alternate black and white like a dotted line. The inside looks random. A QR code, by contrast, has three large squares in its corners. What is a Data Matrix code? labels each part.
How can I test my Data Matrix scanner?
Print the scanner test sheet at 100% (Letter or A4), check the 100 mm bar with a ruler, then scan each of the 12 codes. Your scanner should return exactly the text listed for that code. Codes that fail show your scanner’s limits: tiny modules (T3), DMRE sizes (T9), GS1 separators (T10) or UTF-8 text (T11). You can also decode a sample on screen with our reader.
Can I use these sample codes in my project?
Yes. Every sample image, the test sheet, the CSV and the icon are free to use for any purpose under CC0; no credit needed, though a link is welcome. The data inside is made up. Do not put the GS1 example on a real product: 09506000134352 is the example GTIN GS1 uses in its own documents, not a product you own.