Short answer
A Data Matrix needs a quiet zone (blank border) of at least 1 module on all four sides. We recommend 2 or more, and more on busy or textured backgrounds.
Its printed size is the number of modules plus the quiet zone, times the size of one module (the X-dimension), which you choose for your printer and scanner.
Two numbers decide how a printed code looks: how many squares it has, which comes from your data (see the Data Matrix size chart), and how big each square is, which is up to you. This guide covers the second number and the blank space around the code.
What the quiet zone is
The quiet zone is the empty margin around the code. A scanner finds a Data Matrix by its solid L-shaped edge (the finder pattern) and the dotted edges opposite (the clock track). If something dark sits right next to those edges, the scanner cannot tell where the code ends, and it may not read at all.
- Quiet zone, shaded: blank space on all four sides, here 2 modules (2X) wide.
- Module: one small square. Its width is the X-dimension; every size on this page is a multiple of it.
- Finder pattern: the solid L on the left and bottom edges. A scanner looks for it first.
- Clock track: alternating squares on the top and right edges, used to count rows and columns.
The quiet zone is measured in modules, so it grows with the code. A 2-module quiet zone is 1 mm wide when each module is 0.5 mm, and 0.5 mm wide when each module is 0.25 mm.
How big should the quiet zone be?
- 1 module is the minimum. ISO/IEC 16022, the Data Matrix standard, requires it, and so does GS1: its GS1 DataMatrix Guideline describes the quiet zone as a constant width equal to the X-dimension on each of the four sides, and says a code with less fails an ISO/IEC 15415 print-quality check.
- 2 modules is our default. It leaves room for a label that prints slightly off-center, a cutter that drifts, or ink that spreads. Our generator never lets you go below 1.
- 4 modules or more when the code sits on a busy or textured surface, near a fold or seam, on a curved part, or wherever the code's position on the label can move by more than a module or two.
| Module size | 1 module (minimum) | 2 modules (default) | 4 modules |
|---|---|---|---|
| 0.25 mm9.8 mil | 0.25 mm0.010 in | 0.50 mm0.020 in | 1.00 mm0.039 in |
| 0.33 mm13.0 mil | 0.33 mm0.013 in | 0.66 mm0.026 in | 1.32 mm0.052 in |
| 0.50 mm19.7 mil | 0.50 mm0.020 in | 1.00 mm0.039 in | 2.00 mm0.079 in |
| 0.75 mm29.5 mil | 0.75 mm0.030 in | 1.50 mm0.059 in | 3.00 mm0.118 in |
| 1.00 mm39.4 mil | 1.00 mm0.039 in | 2.00 mm0.079 in | 4.00 mm0.157 in |
Choosing a module size
The module size, or X-dimension, is the width of one small square. Bigger modules are easier to print and scan, from further away and with cheaper scanners. Smaller ones save space. Three things set the limit:
- Your printer's dots. Each module should be a whole number of printer dots, so every square prints the same size.
- Your scanner. Phone cameras and basic 2D scanners struggle with very small modules; scanners made for small codes do better.
- Any rules you must follow. GS1 and some industries set a minimum and maximum module size.
A 203 dpi thermal printer has dots 0.125 mm apart; a 300 dpi printer, 0.0847 mm. These are the whole-dot module sizes between about 0.25 mm and 0.75 mm:
| Dots | Module | Mils |
|---|---|---|
| 2 | 0.250 mm | 9.9 |
| 3 | 0.375 mm | 14.8 |
| 4 | 0.500 mm | 19.7 |
| 5 | 0.626 mm | 24.6 |
| 6 | 0.751 mm | 29.6 |
| Dots | Module | Mils |
|---|---|---|
| 3 | 0.254 mm | 10.0 |
| 4 | 0.339 mm | 13.3 |
| 5 | 0.423 mm | 16.7 |
| 6 | 0.508 mm | 20.0 |
| 7 | 0.593 mm | 23.3 |
| 8 | 0.677 mm | 26.7 |
| 9 | 0.762 mm | 30.0 |
| Dots | Module | Mils |
|---|---|---|
| 6 | 0.254 mm | 10.0 |
| 8 | 0.339 mm | 13.3 |
| 10 | 0.423 mm | 16.7 |
| 12 | 0.508 mm | 20.0 |
| 14 | 0.593 mm | 23.3 |
| 16 | 0.677 mm | 26.7 |
| 18 | 0.762 mm | 30.0 |
Our generator warns when a module is under 0.25 mm or under 2 printer dots, because a single-dot square prints unevenly. When you set a printer resolution it rounds each module to whole dots and tells you the real size.
If your codes carry GS1 data, GS1 sets the module range for each use. Some examples:
| Use | Minimum | Target | Maximum |
|---|---|---|---|
| Regulated healthcare, non-retail items (not scanned in general distribution) | 0.254 mm | 0.380 mm | 0.990 mm |
| Regulated healthcare, retail items (not scanned in general distribution) | 0.396 mm | 0.495 mm | 0.990 mm |
| Trade items scanned in retail pharmacy and general distribution, or non-retail pharmacy and general distribution | 0.750 mm | 0.750 mm | 1.520 mm |
| GS1 keys GDTI, GRAI, GIAI and GLN (assets, documents, locations; up to 1.520 mm for location marking) | 0.375 mm | 0.375 mm | 0.743 mm |
| Direct part marking, items other than medical devices | 0.254 mm | 0.300 mm | 0.615 mm |
GS1 revises these tables every January, and older documents (including the 2018 GS1 DataMatrix Guideline) still show earlier values. Check the current General Specifications before relying on a value, and follow your trading partner's spec if it is stricter.
Print size calculator
Pick a symbol size, your printer and the dots per module. The calculator uses the same sizing code as the generator, including the whole-dot rounding.
Printed size with the quiet zone
10.0 mm
- Each module (X)
- 0.500 mm19.7 mil · 4 dots
- Code alone
- 8.01 mm
- Quiet zone each side
- 1.00 mm
(16 + 2 × 2) × 0.500 mm = 10.010 mm wide
Worked example. A 16 × 16 code on a 203 dpi printer at 3 dots per module: each module is 0.375 mm, the code is 6.01 mm wide, and with a 2-module quiet zone it needs 7.51 mm (0.296 in) of label. At 0.5 mm modules the same code needs 10.0 mm.
Print size table
Printed width including a 2-module quiet zone, for each square size up to 52 × 52 and the six rectangles, at three whole-dot module sizes per printer. Sizes are rows × columns; rectangles print as width × height.
| Size (modules) | 2 dots0.250 mm | 3 dots0.375 mm | 4 dots0.500 mm |
|---|---|---|---|
| 10 × 10 | 3.5 mm 0.14 in | 5.3 mm 0.21 in | 7.0 mm 0.28 in |
| 12 × 12 | 4.0 mm 0.16 in | 6.0 mm 0.24 in | 8.0 mm 0.32 in |
| 14 × 14 | 4.5 mm 0.18 in | 6.8 mm 0.27 in | 9.0 mm 0.35 in |
| 16 × 16 | 5.0 mm 0.20 in | 7.5 mm 0.30 in | 10.0 mm 0.39 in |
| 18 × 18 | 5.5 mm 0.22 in | 8.3 mm 0.33 in | 11.0 mm 0.43 in |
| 20 × 20 | 6.0 mm 0.24 in | 9.0 mm 0.35 in | 12.0 mm 0.47 in |
| 22 × 22 | 6.5 mm 0.26 in | 9.8 mm 0.38 in | 13.0 mm 0.51 in |
| 24 × 24 | 7.0 mm 0.28 in | 10.5 mm 0.41 in | 14.0 mm 0.55 in |
| 26 × 26 | 7.5 mm 0.30 in | 11.3 mm 0.44 in | 15.0 mm 0.59 in |
| 32 × 32 | 9.0 mm 0.35 in | 13.5 mm 0.53 in | 18.0 mm 0.71 in |
| 36 × 36 | 10.0 mm 0.39 in | 15.0 mm 0.59 in | 20.0 mm 0.79 in |
| 40 × 40 | 11.0 mm 0.43 in | 16.5 mm 0.65 in | 22.0 mm 0.87 in |
| 44 × 44 | 12.0 mm 0.47 in | 18.0 mm 0.71 in | 24.0 mm 0.95 in |
| 48 × 48 | 13.0 mm 0.51 in | 19.5 mm 0.77 in | 26.0 mm 1.02 in |
| 52 × 52 | 14.0 mm 0.55 in | 21.0 mm 0.83 in | 28.0 mm 1.10 in |
| 8 × 18 | 5.5 × 3.0 mm 0.22 × 0.12 in | 8.3 × 4.5 mm 0.33 × 0.18 in | 11.0 × 6.0 mm 0.43 × 0.24 in |
| 8 × 32 | 9.0 × 3.0 mm 0.35 × 0.12 in | 13.5 × 4.5 mm 0.53 × 0.18 in | 18.0 × 6.0 mm 0.71 × 0.24 in |
| 12 × 26 | 7.5 × 4.0 mm 0.30 × 0.16 in | 11.3 × 6.0 mm 0.44 × 0.24 in | 15.0 × 8.0 mm 0.59 × 0.32 in |
| 12 × 36 | 10.0 × 4.0 mm 0.39 × 0.16 in | 15.0 × 6.0 mm 0.59 × 0.24 in | 20.0 × 8.0 mm 0.79 × 0.32 in |
| 16 × 36 | 10.0 × 5.0 mm 0.39 × 0.20 in | 15.0 × 7.5 mm 0.59 × 0.30 in | 20.0 × 10.0 mm 0.79 × 0.39 in |
| 16 × 48 | 13.0 × 5.0 mm 0.51 × 0.20 in | 19.5 × 7.5 mm 0.77 × 0.30 in | 26.0 × 10.0 mm 1.02 × 0.39 in |
| Size (modules) | 3 dots0.254 mm | 4 dots0.339 mm | 6 dots0.508 mm |
|---|---|---|---|
| 10 × 10 | 3.6 mm 0.14 in | 4.7 mm 0.19 in | 7.1 mm 0.28 in |
| 12 × 12 | 4.1 mm 0.16 in | 5.4 mm 0.21 in | 8.1 mm 0.32 in |
| 14 × 14 | 4.6 mm 0.18 in | 6.1 mm 0.24 in | 9.1 mm 0.36 in |
| 16 × 16 | 5.1 mm 0.20 in | 6.8 mm 0.27 in | 10.2 mm 0.40 in |
| 18 × 18 | 5.6 mm 0.22 in | 7.5 mm 0.29 in | 11.2 mm 0.44 in |
| 20 × 20 | 6.1 mm 0.24 in | 8.1 mm 0.32 in | 12.2 mm 0.48 in |
| 22 × 22 | 6.6 mm 0.26 in | 8.8 mm 0.35 in | 13.2 mm 0.52 in |
| 24 × 24 | 7.1 mm 0.28 in | 9.5 mm 0.37 in | 14.2 mm 0.56 in |
| 26 × 26 | 7.6 mm 0.30 in | 10.2 mm 0.40 in | 15.2 mm 0.60 in |
| 32 × 32 | 9.1 mm 0.36 in | 12.2 mm 0.48 in | 18.3 mm 0.72 in |
| 36 × 36 | 10.2 mm 0.40 in | 13.5 mm 0.53 in | 20.3 mm 0.80 in |
| 40 × 40 | 11.2 mm 0.44 in | 14.9 mm 0.59 in | 22.4 mm 0.88 in |
| 44 × 44 | 12.2 mm 0.48 in | 16.3 mm 0.64 in | 24.4 mm 0.96 in |
| 48 × 48 | 13.2 mm 0.52 in | 17.6 mm 0.69 in | 26.4 mm 1.04 in |
| 52 × 52 | 14.2 mm 0.56 in | 19.0 mm 0.75 in | 28.4 mm 1.12 in |
| 8 × 18 | 5.6 × 3.0 mm 0.22 × 0.12 in | 7.5 × 4.1 mm 0.29 × 0.16 in | 11.2 × 6.1 mm 0.44 × 0.24 in |
| 8 × 32 | 9.1 × 3.0 mm 0.36 × 0.12 in | 12.2 × 4.1 mm 0.48 × 0.16 in | 18.3 × 6.1 mm 0.72 × 0.24 in |
| 12 × 26 | 7.6 × 4.1 mm 0.30 × 0.16 in | 10.2 × 5.4 mm 0.40 × 0.21 in | 15.2 × 8.1 mm 0.60 × 0.32 in |
| 12 × 36 | 10.2 × 4.1 mm 0.40 × 0.16 in | 13.5 × 5.4 mm 0.53 × 0.21 in | 20.3 × 8.1 mm 0.80 × 0.32 in |
| 16 × 36 | 10.2 × 5.1 mm 0.40 × 0.20 in | 13.5 × 6.8 mm 0.53 × 0.27 in | 20.3 × 10.2 mm 0.80 × 0.40 in |
| 16 × 48 | 13.2 × 5.1 mm 0.52 × 0.20 in | 17.6 × 6.8 mm 0.69 × 0.27 in | 26.4 × 10.2 mm 1.04 × 0.40 in |
| Size (modules) | 6 dots0.254 mm | 8 dots0.339 mm | 12 dots0.508 mm |
|---|---|---|---|
| 10 × 10 | 3.6 mm 0.14 in | 4.7 mm 0.19 in | 7.1 mm 0.28 in |
| 12 × 12 | 4.1 mm 0.16 in | 5.4 mm 0.21 in | 8.1 mm 0.32 in |
| 14 × 14 | 4.6 mm 0.18 in | 6.1 mm 0.24 in | 9.1 mm 0.36 in |
| 16 × 16 | 5.1 mm 0.20 in | 6.8 mm 0.27 in | 10.2 mm 0.40 in |
| 18 × 18 | 5.6 mm 0.22 in | 7.5 mm 0.29 in | 11.2 mm 0.44 in |
| 20 × 20 | 6.1 mm 0.24 in | 8.1 mm 0.32 in | 12.2 mm 0.48 in |
| 22 × 22 | 6.6 mm 0.26 in | 8.8 mm 0.35 in | 13.2 mm 0.52 in |
| 24 × 24 | 7.1 mm 0.28 in | 9.5 mm 0.37 in | 14.2 mm 0.56 in |
| 26 × 26 | 7.6 mm 0.30 in | 10.2 mm 0.40 in | 15.2 mm 0.60 in |
| 32 × 32 | 9.1 mm 0.36 in | 12.2 mm 0.48 in | 18.3 mm 0.72 in |
| 36 × 36 | 10.2 mm 0.40 in | 13.5 mm 0.53 in | 20.3 mm 0.80 in |
| 40 × 40 | 11.2 mm 0.44 in | 14.9 mm 0.59 in | 22.4 mm 0.88 in |
| 44 × 44 | 12.2 mm 0.48 in | 16.3 mm 0.64 in | 24.4 mm 0.96 in |
| 48 × 48 | 13.2 mm 0.52 in | 17.6 mm 0.69 in | 26.4 mm 1.04 in |
| 52 × 52 | 14.2 mm 0.56 in | 19.0 mm 0.75 in | 28.4 mm 1.12 in |
| 8 × 18 | 5.6 × 3.0 mm 0.22 × 0.12 in | 7.5 × 4.1 mm 0.29 × 0.16 in | 11.2 × 6.1 mm 0.44 × 0.24 in |
| 8 × 32 | 9.1 × 3.0 mm 0.36 × 0.12 in | 12.2 × 4.1 mm 0.48 × 0.16 in | 18.3 × 6.1 mm 0.72 × 0.24 in |
| 12 × 26 | 7.6 × 4.1 mm 0.30 × 0.16 in | 10.2 × 5.4 mm 0.40 × 0.21 in | 15.2 × 8.1 mm 0.60 × 0.32 in |
| 12 × 36 | 10.2 × 4.1 mm 0.40 × 0.16 in | 13.5 × 5.4 mm 0.53 × 0.21 in | 20.3 × 8.1 mm 0.80 × 0.32 in |
| 16 × 36 | 10.2 × 5.1 mm 0.40 × 0.20 in | 13.5 × 6.8 mm 0.53 × 0.27 in | 20.3 × 10.2 mm 0.80 × 0.40 in |
| 16 × 48 | 13.2 × 5.1 mm 0.52 × 0.20 in | 17.6 × 6.8 mm 0.69 × 0.27 in | 26.4 × 10.2 mm 1.04 × 0.40 in |
Generated from engine v2.0.1 with its own sizing function. For other sizes, quiet zones or printers, use the calculator above.
Quiet-zone mistakes that stop scans
- Text too close. A caption or part number printed right under the code eats the quiet zone. Leave the full quiet zone, then the text.
- The label edge. A code placed flush with the edge of a label has no quiet zone on that side once the label is stuck on something dark.
- Frames and boxes. A border drawn around the code is a common mistake. Put it outside the quiet zone, or leave it off.
- Logos and backgrounds. Patterns, photos or a colored panel behind the code act like dark modules to a scanner.
- Stretching in Word or Excel. Dragging a corner to resize can squash the code and its margin unevenly. Insert it at the size you made it, at 100%.
We drew a black frame at three distances from the same code and decoded each image while building this page:
-
Did not read
Frame touching the code
no quiet zone
-
Reads
Frame 1 module away
the minimum
-
Reads
Frame 2 modules away
our default
With the frame touching, the decoder could not find the code's edge and the code did not read at all. One module of space was enough for a perfect image; on a printed label, 2 modules gives you a margin for error. If a code will not scan and you cannot see why, check the quiet zone first, then see codes that won't scan.
Test before a big print run
The simplest way to find your smallest reliable module is to print one sheet and scan it. Our free test sheet has the same kind of code at 6 module sizes, from 0.254 mm to 1.00 mm, and 4 quiet-zone frames, plus scale bars to check that your printer is not resizing the page. Each code reads back as its own label, so your scanner tells you which one it read.
- Print it at 100% (“Actual size”) on the printer and labels or paper you will use.
- Measure the 100 mm bar. If it is off, turn off any “fit” or “scale” setting and print again.
- Scan each code with the scanner or phone your team will use, and tick what reads.
- Choose a module one step bigger than the smallest that read, for a safety margin.
Then make your code in the generator at that module size, or print labels at exact size on sheets or thermal rolls. Both use the same sizing as this guide.
What a good test does and does not prove