DataMatrix size and print calculator
Find out how many codewords your data takes, which DataMatrix size it fits, and how many dots per module your printer resolution gives. See the real X dimension, the symbol size in mm and whether it falls inside a GS1 X-dimension range.
Parenthesised form or raw reader data (separator <GS>). The codeword count matches the encoder exactly.
Common values: thermal transfer (TTO) 200, 300, 600; thermal inkjet (TIJ) 300, 600. Check your printer’s data sheet; for lasers enter the line resolution.
With a width target, X is calculated for each symbol as width ÷ number of columns.
At least 1 module on every side for ECC 200. Change it if your application requires more.
The calculation runs only in your browser; the data you enter is never sent to a server.
- Selected symbol
- 22 × 22
- Data codewords
- 30 (0 padding in the selected symbol)
- Dots per module
- 4 dots (88 dots wide)
- Real X dimension
- 0.339 mm (target 0.330 mm)
- Symbol size (quiet zone excluded)
- 7.45 × 7.45 mm
- With quiet zone: 8.13 × 8.13 mm
- GS1 X-dimension range
- Within range
- Dot pitch: 0.085 mm (25.4 ÷ DPI)
Neighbouring symbols
| Symbol | Capacity | Data | Dots/module | X (mm) | Width (mm) | With quiet zone (mm) | GS1 range |
|---|---|---|---|---|---|---|---|
| 20 × 20 | 22 | Too small (−8) | 4 | 0.339 | 6.77 | 7.45 | Within range |
| 22 × 22selected | 30 | Fits (+0) | 4 | 0.339 | 7.45 | 8.13 | Within range |
| 24 × 24 | 36 | Fits (+6) | 4 | 0.339 | 8.13 | 8.81 | Within range |
| 26 × 26 | 44 | Fits (+14) | 4 | 0.339 | 8.81 | 9.48 | Within range |
Neighbouring whole-dot values (selected symbol)
| Dots/module | X (mm) | Width (mm) | With quiet zone (mm) | GS1 range |
|---|---|---|---|---|
| 2 | 0.169 | 3.73 | 4.06 | Below range |
| 3 | 0.254 | 5.59 | 6.10 | Below range |
| 4selected | 0.339 | 7.45 | 8.13 | Within range |
| 5 | 0.423 | 9.31 | 10.16 | Within range |
| 6 | 0.508 | 11.18 | 12.19 | Within range |
Real-size preview
Approximate on screen (the browser draws 1 mm at 96 DPI). If you print, set the scale to 100%.
This calculation gives geometry only. Print quality depends on the printer, dot gain, contrast and surface; check printed codes with a verifier that grades to ISO/IEC 15415 and with your readers. The GS1 X-dimension range is an example value: see the symbol specification table in the current GS1 General Specifications.
Want to settle the right symbol size together, based on your printer, label and line speed? Let us fit printing and verification into your serialisation flow.
Request a call01
How to use
A
Paste the element string or enter the character and digit counts, and choose the symbol shape. The tool converts the data into codewords and picks the smallest symbol that holds them.
B
Enter the printer resolution (DPI) and the target module size (X) or the target symbol width. The result is rounded to whole dots per module.
C
Review the selected symbol, the neighbouring symbols, the whole-dot options and the real-size preview. Set the GS1 range to the table for your own application.
02
How is the symbol size chosen?
Data Matrix of type ECC 200 (ISO/IEC 16022) comes in 24 square sizes (10×10 up to 144×144) and 6 rectangular sizes. Each size has a fixed capacity: from 3 up to 1558 data codewords. Error correction codewords come on top of that; larger sizes add more of them.
In ASCII encoding two consecutive digits take one codeword and every other character takes one. For GS1 data one FNC1 is added at the start and another at the end of every variable-length field that is followed by another field. The tool counts exactly like the encoder and picks the smallest symbol that carries the data; if capacity is equal, square is preferred. In a symbol below the capacity the data does not fit.
03
Module, dots and X dimension
X is the edge length of one module (a single square of the symbol). A printer consists of dots; the dot pitch is 25.4 mm ÷ DPI (about 0.0847 mm at 300 DPI). With whole dots per module all modules have the same width and sharp edges; a fractional ratio makes some modules one dot wide and others narrower and hurts readability.
Real X = dots per module × dot pitch; the tool picks the whole number closest to your target and also shows the neighbouring values. Symbol width = number of columns × X. For ECC 200 the symbol needs a quiet zone of at least 1 module on every side, which must be counted in the print area.
04
GS1 X-dimension range and limits
The symbol specification table in the GS1 General Specifications gives minimum, target and maximum X dimensions depending on the application: healthcare items, general distribution, non-retail or direct marking are different rows. The 0.255–0.615 mm in this tool is only an example default; enter the values from the table for your own application.
The calculation gives geometry; print quality depends on dot gain, contrast, surface and printer setup. Check printed codes with a verifier that grades to ISO/IEC 15415 and with your own readers. Direct part marking (DPM) has separate rules.
FAQ
- Is my data sent anywhere?
- No. Codeword counting and the size calculation run entirely in code in your browser; the data you enter is not transmitted to any server and is not stored.
- Why must dots per module be a whole number?
- A printer can only print whole dots. With a fractional ratio some modules come out one dot wide and others narrower; edges blur and a reader can sample module centres wrongly. Laser or vector output has no such limit, so you can turn the box off.
- Which DPI value should I enter?
- Enter the real print resolution of your printer. Thermal transfer (TTO) printers commonly offer 200, 300 and 600 DPI, thermal inkjet (TIJ) printers 300 and 600 DPI; check the data sheet for the exact value. The field is free.
- Why is the GS1 X-dimension range editable?
- The symbol specification table in the GS1 General Specifications depends on the application and is updated. The defaults are examples only; enter the minimum and maximum X from the current table for your own application.
- Is the on-screen preview real size?
- Approximately. The browser draws 1 mm from the 96 DPI CSS pixel; your screen’s real density may differ. When printing, set the scale to 100% and check the size with a ruler.
Code generation and verification on your line
Our serialization software talks directly to printers and cameras, prevents duplicate codes and tracks case–pallet aggregation end to end.