Xerobit

Data Matrix Generator for ECC200 Barcodes

A data matrix generator creates compact 2D barcodes used in manufacturing, logistics and healthcare. Enter your text, choose an encoding mode and get a scalable SVG image. The ECC200 standard with Reed-Solomon error correction is applied entirely in your browser, so nothing is uploaded anywhere.

Text or bytes to encode into the Data Matrix symbol.

Result

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 192" width="192" height="192"><rect width="192" height="192" fill="white"/><rect x="16" y="16" width="8" height="8" fill="black"/><rect x="32" y="16" width="8" height="8" fill="black"/><rect x="48" y="16" width="8" height="8" fill="black"/><rect x="64" y="16" width="8" height="8" fill="black"/><rect x="80" y="16" width="8" height="8" fill="black"/><rect x="96" y="16" width="8" height="8" fill="black"/><rect x="112" y="16" width="8" height="8" fill="black"/><rect x="128" y="16" width="8" height="8" fill="black"/><rect x="144" y="16" width="8" height="8" fill="black"/><rect x="160" y="16" width="8" height="8" fill="black"/><rect x="16" y="24" width="8" height="8" fill="black"/><rect x="32" y="24" width="16" height="8" fill="black"/><rect x="56" y="24" width="16" height="8" fill="black"/><rect x="80" y="24" width="8" height="8" fill="black"/><rect x="96" y="24" width="8" height="8" fill="black"/><rect x="112" y="24" width="8" height="8" fill="black"/><rect x="128" y="24" width="16" height="8" fill="black"/><rect x="160" y="24" width="16" height="8" fill="black"/><rect x="16" y="32" width="16" height="8" fill="black"/><rect x="56" y="32" width="16" height="8" fill="black"/><rect x="80" y="32" width="8" height="8" fill="black"/><rect x="104" y="32" width="8" height="8" fill="black"/><rect x="120" y="32" width="16" height="8" fill="black"/><rect x="144" y="32" width="8" height="8" fill="black"/><rect x="16" y="40" width="24" height="8" fill="black"/><rect x="48" y="40" width="16" height="8" fill="black"/><rect x="88" y="40" width="16" height="8" fill="black"/><rect x="112" y="40" width="16" height="8" fill="black"/><rect x="168" y="40" width="8" height="8" fill="black"/><rect x="16" y="48" width="16" height="8" fill="black"/><rect x="72" y="48" width="8" height="8" fill="black"/><rect x="104" y="48" width="8" height="8" fill="black"/><rect x="120" y="48" width="16" height="8" fill="black"/><rect x="16" y="56" width="24" height="8" fill="black"/><rect x="48" y="56" width="8" height="8" fill="black"/><rect x="64" y="56" width="8" height="8" fill="black"/><rect x="88" y="56" width="16" height="8" fill="black"/><rect x="112" y="56" width="16" height="8" fill="black"/><rect x="160" y="56" width="16" height="8" fill="black"/><rect x="16" y="64" width="8" height="8" fill="black"/><rect x="32" y="64" width="8" height="8" fill="black"/><rect x="48" y="64" width="16" height="8" fill="black"/><rect x="88" y="64" width="8" height="8" fill="black"/><rect x="104" y="64" width="8" height="8" fill="black"/><rect x="136" y="64" width="24" height="8" fill="black"/><rect x="16" y="72" width="8" height="8" fill="black"/><rect x="48" y="72" width="8" height="8" fill="black"/><rect x="64" y="72" width="8" height="8" fill="black"/><rect x="80" y="72" width="24" height="8" fill="black"/><rect x="112" y="72" width="8" height="8" fill="black"/><rect x="128" y="72" width="8" height="8" fill="black"/><rect x="144" y="72" width="16" height="8" fill="black"/><rect x="168" y="72" width="8" height="8" fill="black"/><rect x="16" y="80" width="8" height="8" fill="black"/><rect x="32" y="80" width="24" height="8" fill="black"/><rect x="96" y="80" width="8" height="8" fill="black"/><rect x="128" y="80" width="40" height="8" fill="black"/><rect x="16" y="88" width="8" height="8" fill="black"/><rect x="32" y="88" width="16" height="8" fill="black"/><rect x="56" y="88" width="16" height="8" fill="black"/><rect x="88" y="88" width="8" height="8" fill="black"/><rect x="104" y="88" width="32" height="8" fill="black"/><rect x="144" y="88" width="8" height="8" fill="black"/><rect x="160" y="88" width="16" height="8" fill="black"/><rect x="16" y="96" width="16" height="8" fill="black"/><rect x="48" y="96" width="8" height="8" fill="black"/><rect x="72" y="96" width="8" height="8" fill="black"/><rect x="88" y="96" width="48" height="8" fill="black"/><rect x="16" y="104" width="8" height="8" fill="black"/><rect x="32" y="104" width="8" height="8" fill="black"/><rect x="72" y="104" width="24" height="8" fill="black"/><rect x="104" y="104" width="8" height="8" fill="black"/><rect x="128" y="104" width="32" height="8" fill="black"/><rect x="168" y="104" width="8" height="8" fill="black"/><rect x="16" y="112" width="8" height="8" fill="black"/><rect x="32" y="112" width="16" height="8" fill="black"/><rect x="64" y="112" width="24" height="8" fill="black"/><rect x="96" y="112" width="40" height="8" fill="black"/><rect x="144" y="112" width="8" height="8" fill="black"/><rect x="16" y="120" width="16" height="8" fill="black"/><rect x="40" y="120" width="16" height="8" fill="black"/><rect x="64" y="120" width="16" height="8" fill="black"/><rect x="136" y="120" width="16" height="8" fill="black"/><rect x="160" y="120" width="16" height="8" fill="black"/><rect x="16" y="128" width="48" height="8" fill="black"/><rect x="80" y="128" width="16" height="8" fill="black"/><rect x="128" y="128" width="8" height="8" fill="black"/><rect x="152" y="128" width="16" height="8" fill="black"/><rect x="16" y="136" width="16" height="8" fill="black"/><rect x="40" y="136" width="24" height="8" fill="black"/><rect x="88" y="136" width="8" height="8" fill="black"/><rect x="104" y="136" width="8" height="8" fill="black"/><rect x="136" y="136" width="16" height="8" fill="black"/><rect x="160" y="136" width="16" height="8" fill="black"/><rect x="16" y="144" width="16" height="8" fill="black"/><rect x="40" y="144" width="8" height="8" fill="black"/><rect x="64" y="144" width="8" height="8" fill="black"/><rect x="96" y="144" width="8" height="8" fill="black"/><rect x="120" y="144" width="8" height="8" fill="black"/><rect x="136" y="144" width="8" height="8" fill="black"/><rect x="152" y="144" width="8" height="8" fill="black"/><rect x="16" y="152" width="8" height="8" fill="black"/><rect x="32" y="152" width="8" height="8" fill="black"/><rect x="48" y="152" width="8" height="8" fill="black"/><rect x="96" y="152" width="48" height="8" fill="black"/><rect x="152" y="152" width="8" height="8" fill="black"/><rect x="168" y="152" width="8" height="8" fill="black"/><rect x="16" y="160" width="16" height="8" fill="black"/><rect x="40" y="160" width="8" height="8" fill="black"/><rect x="56" y="160" width="8" height="8" fill="black"/><rect x="88" y="160" width="8" height="8" fill="black"/><rect x="120" y="160" width="16" height="8" fill="black"/><rect x="144" y="160" width="8" height="8" fill="black"/><rect x="160" y="160" width="8" height="8" fill="black"/><rect x="16" y="168" width="160" height="8" fill="black"/></svg>
  • Symbol size
    20 x 20
  • Data codewords
    22

    19 used, rest is padding

  • ECC codewords
    18
  • Encoding mode
    ASCII
  • Total codewords
    40

How to use the data matrix generator

  1. Enter the text or data you want to encode in the Data to encode field.
  2. Select the Encoding mode: ASCII for standard text and digits, or Base 256 for binary data.
  3. Adjust the Module size to control how large each square dot appears in the final image.
  4. Click Generate to create the ECC200 Data Matrix barcode as an SVG.

How ECC200 Data Matrix encoding works

The ECC200 standard defines how data is converted into a grid of dark and light modules. First, the input text is translated into codewords. In ASCII mode, single digits are paired and encoded as one codeword (value = pair + 130), while other ASCII characters use their value plus one. In Base 256 mode, the text is converted to UTF-8 bytes and those byte values are used directly.

After the data codewords are formed, Reed-Solomon error correction codewords are calculated over the Galois Field GF(256) using the polynomial 301. These extra codewords allow scanners to recover the original message even if part of the symbol is damaged or obscured. Finally, the combined codewords are placed into the matrix following a specific diagonal pattern defined by the ISO 16022 specification.

Symbol sizes and capacity

A data matrix generator must select the smallest square symbol that fits the encoded data. The size is always an even number of modules, starting at 10x10 and scaling up to 144x144.

Symbol SizeData CodewordsECC CodewordsMax ASCII Capacity
10 x 10353 characters
12 x 12575 characters
14 x 148108 characters
16 x 16121212 characters
18 x 18181418 characters

Larger symbols follow the same pattern, adding more data and error correction regions. The finder pattern consists of a solid dark L-shape on the bottom-left and an alternating clock track on the top and right edges.

ASCII vs Base 256 modes

Choosing the right encoding mode affects how much data fits inside the symbol. ASCII mode is optimal for standard text and numbers. It compresses pairs of digits into a single codeword, making it highly efficient for numeric sequences like serial numbers or dates.

Base 256 mode treats every character as a raw byte. It adds a length indicator and applies the 255-state randomisation that the standard requires for this mode. Characters outside ASCII are encoded as UTF-8 bytes in both modes; Base 256 is the more compact choice when most of the text is non-ASCII.

Common uses for Data Matrix barcodes

Data Matrix symbols are favored where space is limited but reliability is critical. In electronics manufacturing, they are laser-etched directly onto circuit boards and microchips for permanent part tracking. Healthcare systems use them on surgical instruments and medication packaging to ensure accurate scanning even after repeated sterilization cycles.

Logistics companies print them on shipping labels because the Reed-Solomon error correction allows the code to be read even when part of the symbol is scratched or dirty; how much damage it tolerates depends on the symbol size. Unlike linear codes produced by a standard barcode generator, 2D matrices store significantly more information in a fraction of the physical space.

Error correction and reliability

The ECC200 standard relies on Reed-Solomon error correction computed in GF(256). This mathematical approach generates redundant codewords that act as a safety net. If a scanner misreads several modules due to poor lighting, low contrast or physical damage, the algorithm uses the remaining valid codewords and the error correction data to reconstruct the original message perfectly.

This makes the datamatrix format far more robust than older 2D standards that lacked advanced error correction. The number of ECC codewords scales with the symbol size, ensuring that larger symbols carrying more data also receive proportionally stronger protection against reading errors.

Worked examples

ExampleInputResult
Simple textData to encode: Hello; Encoding mode: ascii; Module size (px): 8; Background: whiteSymbol size: 12 x 12; Data codewords: 5; ECC codewords: 7; Encoding mode: ASCII; Total codewords: 12
Digits onlyData to encode: 123456; Encoding mode: ascii; Module size (px): 10; Background: whiteSymbol size: 10 x 10; Data codewords: 3; ECC codewords: 5; Encoding mode: ASCII; Total codewords: 8
Binary modeData to encode: ABC; Encoding mode: base256; Module size (px): 6; Background: transparentSymbol size: 12 x 12; Data codewords: 5; ECC codewords: 7; Encoding mode: Base 256; Total codewords: 12

FAQ

What is a Data Matrix barcode?

It is a two-dimensional barcode consisting of dark and light square modules arranged in a square grid. It encodes text or binary data and includes built-in error correction.

What does ECC200 mean?

ECC200 is the current international standard (ISO 16022) for Data Matrix symbols. It specifies the encoding rules, symbol sizes and Reed-Solomon error correction algorithms used today.

Can I scan the generated SVG?

Yes. The SVG follows the ECC200 module placement and error correction rules, so standard 2D barcode scanners and phone apps can decode it. Keep the quiet zone, print at a module size your printer can reproduce sharply, and test a printed sample before a production run.

When should I use Base 256 instead of ASCII?

Use Base 256 when encoding raw binary data or characters outside the standard ASCII range. For regular text and numbers, ASCII mode is more space-efficient.

How much data can a Data Matrix hold?

The capacity depends on the symbol size. In this tool the largest symbol, 144 x 144, holds up to 3,116 digits or 1,555 ASCII characters. The standard's other encodation schemes can pack more text into the same symbol, but this generator uses ASCII and Base 256 only.

Is my data sent to a server?

No. This data matrix generator runs entirely in your browser. Your text is processed locally and never uploaded to any server.