Data Matrix Generator
Make a Data Matrix code online for free. Type any text, choose a square or rectangular symbol, and let the generator pick the smallest size or set one yourself. A capacity meter shows how much more fits, and you can download SVG, PNG, PDF or EPS at your printer's DPI.
7.9 × 7.9 mm at 300 DPI
Scaled to fit. Actual size shows the print size on screen.
Print simulationNew
Shows how a worn print looks and tests it with the decoder.
Blue bars: the start, center and end guard patterns. Downloads stay in your chosen colors.
- Type
- Data Matrix · 2D
- Print size
- 7.9 × 7.9 mm
- Raster
- 96 × 96 px
- Symbol
- 16 × 16
- GS1 prefix
- Read back
Download
Vector drawing, 7.9 × 7.9 mm. Design and label programs place it at its print size.
More export optionsNewTest sheet · size set · embed code
Print test sheet (PDF)
The code at 80%, 100% and 150% with 100 mm and 4 in rulers. Print it at actual size and scan each copy before printing many.
Size set (ZIP)
Magnification
DPI
Embed code
How to Generate a Data Matrix Code
Type the data, choose the shape and size, check the capacity line, and download the file.
- Type the text, number or web address you want to encode.
- Choose Square or Rectangle, and a size, or keep Smallest that fits.
- Read the line under the data: the symbol size in modules and how many characters fit.
- Set the X-dimension for your printer, then download SVG, PNG, PDF or EPS and scan a test print.
Data Matrix Sizes
Data Matrix has 24 square and 6 rectangular sizes, and every size has its own capacity and error correction.
Square Sizes
Smallest: 10 × 10 modules, for a few digits or letters.

Largest: 144 × 144 modules, for up to 3,116 digits or 2,335 capital letters and digits.

In between: 22 more sizes, from 12 × 12 to 132 × 132 modules.

Rectangular Data Matrix Codes
- Sizes: 8 × 18, 8 × 32, 12 × 26, 12 × 36, 16 × 36 and 16 × 48 modules.
- Use: narrow spaces on a label.
- Largest: 16 × 48 modules hold 98 digits or 72 capital letters and digits.

Data Matrix Specifications
These are the rules of Data Matrix ECC 200 as described in the encoder's reference, which cites ISO/IEC 16022.
| Property | Data Matrix |
|---|---|
| Digits | Up to 3,116 digits in the largest symbol (144 × 144 modules) |
| Characters | Any data, ASCII and extended ASCII; readers use ISO/IEC 8859-1 unless an ECI says otherwise |
| Check digit | No check digit: error correction is built into every size (ECC 200) |
| Sizes | 24 square sizes from 10 × 10 to 144 × 144 modules, and 6 rectangular sizes from 8 × 18 to 16 × 48 |
| Capacity in this generator | 144 × 144: 3,116 digits or 2,335 capital letters and digits; 16 × 48: 98 digits or 72 capital letters and digits |
| Variants | Data Matrix Rectangular and its Rectangular Extension, GS1 DataMatrix, GS1 Digital Link Data Matrix, HIBC Data Matrix and Royal Mail Mailmark |
| Other character sets | Extended Channel Interpretation (ECI) indicators switch readers to another code page, where the reader supports them |
| Structured data | The encoder compresses ISO/IEC 15434 structured data with the 05 and 06 Macro codewords |
| Standards | ISO/IEC 16022 and ANSI/AIM BC11 |
| Where the numbers come from | Your own data |
| Example | BC-2026-0042 |
BWIPP Data Matrix reference (sizes, variants, data, ECI, structured data, standards); capacities measured with this generator's encoder (test/phase8.test.ts).
Sources, checked 2026-10-04: Data Matrix reference (BWIPP, the encoder bwip-js implements).
Data Matrix vs QR Code
Both are 2D matrix codes; Data Matrix can also be rectangular and starts smaller, while QR Code holds more data and lets you choose the error correction level.
| Property | Data Matrix | QR Code |
|---|---|---|
| Smallest symbol | 10 × 10 modules | 21 × 21 modules |
| Largest symbol | 144 × 144 modules | 177 × 177 modules |
| Most digits | 3,116 | 7,089 (error correction L) |
| Shapes | Square or rectangular | Square |
| Error correction | Fixed by the size | Chosen: L, M, Q or H |
Which One to Choose
Choose Data Matrix for small labels where space is tight or the code must be rectangular. Choose QR Code when you need more data or a chosen error correction level.
Data Matrix vs QR code size, capacity and error correction compared in full.


Printing Data Matrix Codes
Keep at least one module of blank space around the code and print each module as a whole number of printer dots.
Module Size and Quiet Zone
The X-dimension is the width of one square module. The generator turns it into whole printer dots at the DPI you choose and warns when the quiet zone is below one module, the minimum GS1 sets for GS1 DataMatrix.
Check the Capacity
The line under the data shows the symbol size and how many characters of data like yours fit. When the data is too long for a fixed size, the generator says so instead of drawing a broken code.
Frequently Asked Questions
Is This Data Matrix Generator Free?
Yes. There is no account, watermark or download limit, and the codes may be used commercially.
What Is ECC 200?
ECC 200 is the name of the Data Matrix version this generator makes, with error correction built into every size. The encoder's reference lists Data Matrix ECC 200 as another name for Data Matrix.
How Much Data Fits in a Data Matrix Code?
The largest square symbol holds 3,116 digits or 2,335 capital letters and digits in this generator. Text with lowercase letters and symbols fits fewer characters; the capacity line shows the limit for your data.
Can a Phone Read a Data Matrix Code?
A scanner app that supports Data Matrix can. The Barcode.codes scanner and reader read Data Matrix in the browser, from the camera or from a photo.
Should I Use GS1 DataMatrix Instead?
Use GS1 DataMatrix when the code carries GS1 data such as a GTIN, batch or expiry date for trading partners. The generator offers it as a separate type.
Why Is My Data Matrix Code Rectangular?
You chose Rectangle, which suits narrow spaces. Choose Square to get a square symbol again.
Related Barcode Tools
- PDF417 generator
A stacked 2D code for long text.
- Aztec code generator
A square 2D code that grows in layers.
- Scan a Data Matrix code
Check a printed code with your camera.