⬛ DataMatrix Generator

18 chars
Foreground#000000
Background#ffffff

DataMatrix is a 2D barcode that encodes text or binary data in a square or rectangular grid of black and white cells. It is widely used in industrial, logistics, and healthcare applications for its compact size and high data density.

Enter text to generate a DataMatrix code

Generate DataMatrix 2D barcodes from text or binary data. It's more compact and higher-density than QR codes, so it's often used for marking small parts or circuit boards, as well as traceability labels on industrial products.

How to use

  1. Enter text or data into the input box.
  2. Adjust the foreground and background color if needed.
  3. Copy the generated DataMatrix code as SVG, or download it.

How the calculation works

Generate a Data Matrix code, a two-dimensional code that packs a lot of information into a small space. It is a square grid with solid lines along the left and bottom edges and dotted lines along the right and top. The version made here is ECC200, the current standard with built-in error correction. Sizes run from 10×10 to 144×144 modules, chosen to fit your input. It holds up to 3,116 digits, 2,335 alphanumeric characters or 1,556 bytes.

Worked example

Serial number “SN-2026-000123” (14 characters) → a small code of about 16×16 modules Common on electronic components, medical devices and car parts, where serial or lot numbers are marked directly on the part.

Things to be aware of

  • Japanese and other non-ASCII text is written as UTF-8 without a character-set marker, so some readers show it garbled. A QR code is more reliable for Japanese.
  • Leave at least one module of margin around the code.
  • For long, narrow print areas, rectangular Data Matrix symbols are another option.

FAQ

How is this different from a QR code?

DataMatrix packs a similar amount of information into a smaller space, making it popular for space-constrained uses like marking electronic components.

What formats can I export?

Download as SVG or PNG.

Is this suitable for marking electronic components or circuit boards?

Yes — DataMatrix's high density lets it fit into very small spaces, which is why it's commonly used to mark electronic parts and small circuit boards directly.

Is this useful for industrial product traceability?

Yes — encode a lot number or serial number to use as a traceability code for tracking a product.

What equipment do I need to scan it?

Any DataMatrix-capable barcode scanner or scanning app works. The Barcode Reader tool on this site also supports it.