Barcode · 2D symbols
Data Matrix generator.
Turn text or a GS1 element string into a square Data Matrix ECC 200 symbol from 10×10 to 52×52, with the data codewords and Reed-Solomon check bytes shown, then download it as SVG or PNG. Everything is computed in your browser; nothing you type is uploaded.
Inputs
Result
Enter data and press Generate.
How the symbol is built
A Data Matrix ECC 200 symbol is made in four steps, all of which this page performs and shows:
- Encode to codewords (ASCII mode). Two digits become one codeword with value 130 + the pair (so
12is 142); any other ASCII character becomes its code + 1 (soAis 66); bytes above 127 are sent as 235 (Upper Shift) followed by the byte minus 127. GS1 mode starts with 232 (FNC1) and uses 232 for each separator. - Pad to the symbol's data capacity. The first pad is 129; each later pad at 1-based position p is 129 + ((149 × p) mod 253) + 1, minus 254 if that exceeds 254.
- Add Reed-Solomon check codewords over GF(256) with the prime polynomial x8+x5+x3+x2+1 (0x12D) and generator roots α1 to αn. The 52×52 size splits its data across two interleaved blocks.
- Place the bits. The codewords are laid into the data area by the diagonal “Utah” pattern from ISO/IEC 16022 Annex F, then the solid L finder (left and bottom) and the alternating timing edges (top and right) are drawn around each data region. Sizes 32×32 and up have 2×2 regions.
Worked example: 123456
The six digits form three pairs: 12, 34, 56, giving codewords 130+12 = 142, 130+34 = 164 and 130+56 = 186. That is exactly the 3 data codewords of the smallest symbol, 10×10, so no padding is needed. Its 5 Reed-Solomon codewords are 114, 25, 5, 88, 102, for 8 codewords in total. Add one more digit and the data no longer fits 10×10, so the generator moves up to 12×12 (5 data + 7 check codewords). These values are a golden test in this tool's test suite, and the finished symbol decodes back to 123456 in an independent open decoder.
Square symbol sizes (ECC 200)
| Size | Data codewords | Check codewords | Max digits | Max alphanumeric | Max bytes | RS blocks |
|---|
What this tool does not do
It uses ASCII encodation only. The standard's C40, Text, X12, EDIFACT and Base 256 modes, which can pack some data tighter, and the rectangular and 56×56 to 144×144 sizes are not generated, so a few inputs that a full encoder would squeeze into a smaller or rectangular symbol will use a larger square one here. In GS1 mode the tool does not validate your Application Identifiers or check digits, and a Data Matrix is not a GS1 registration of any number. Symbols were verified by decoding them with an independent open decoder, but print quality, size and contrast still need a scan test on your actual scanners and label stock.
Frequently asked questions
What is the largest Data Matrix this tool makes?
A 52x52 symbol, which holds up to 204 data codewords: 408 digits, 304 alphanumeric characters or 202 bytes in ASCII encodation. Larger sizes up to 144x144 exist in the standard but are not generated here.
Is this a GS1 DataMatrix?
Only if you tick the GS1 option. That puts FNC1 (codeword 232) first and turns each GS character (0x1D) into FNC1, as the GS1 DataMatrix Guideline describes. Without it the symbol is a plain ISO/IEC 16022 Data Matrix. This tool does not check that your AIs or check digits are valid; use the GS1 Application Identifier lookup for that.
Does it work for 2D labels with accents or emoji?
Text is converted to UTF-8 bytes and bytes above 127 use the ASCII-mode Upper Shift codeword. Many scanners decode that as UTF-8 but some assume ISO 8859-1, so scan-test a sample if you need non-ASCII text.
Is my data uploaded?
No. Encoding and export happen in your browser.
Why did the size jump from 14x14 to 16x16 for one extra character?
Symbol sizes come in fixed steps, and each has a fixed number of error-correction codewords. The generator picks the smallest size that fits unless you choose one.
Sources (checked 2026-09-30): GS1 General Specifications, Release 26.0 (Jan 2026), section 5.6.3 and Table 5-32, gs1.org; GS1 DataMatrix Guideline, Release 2.5.1 (Jan 2018), section 2.2.1, GS1_DataMatrix_Guideline.pdf; ISO/IEC 16022:2006 (algorithms: Reed-Solomon, padding, Annex F placement).