Data Matrix Code Generator

Make Data Matrix codes: small square 2D barcodes for parts marking, electronics, pharmaceuticals and labels with lots of data. GS1 DataMatrix is included.

Any text, up to about 1,500 characters

Change the bar width, height and text here. The barcode on the left is drawn at the size it will print, so at 100% zoom it should match a ruler held to the screen.

PNG and JPG files store their resolution, so Word, Canva and label software place them at this size.

Colours

Dark bars on a light background scan best. Most scanners use red light, so red, orange and yellow bars read as blank.

What is a Data Matrix code?

Data Matrix is a 2D barcode made of square cells in a grid, with an L-shaped solid border on two sides and a dotted pattern on the other two. It holds much more data than a linear barcode in a much smaller space: a 10-character serial number fits in a square a few millimetres wide. Error correction (ECC 200, based on Reed–Solomon codes) means it still scans with part of it damaged.

CapacityUp to 2,335 letters or 3,116 digits in one symbol
ShapeSquare (10×10 to 144×144 cells) or rectangular
Error correctionECC 200 (Reed–Solomon), built in
StandardISO/IEC 16022
Read by2D imaging scanners and phone cameras, not laser scanners

Where Data Matrix is used

  • Electronics and parts. Etched or laser-marked onto circuit boards, chips and engine parts, where space is tiny.
  • Medicines. GS1 DataMatrix carries the GTIN, expiry, batch and serial number on drug packs, as required in the EU, US and other markets.
  • Healthcare. Surgical instruments and medical devices (UDI).
  • Postage and logistics. Many postal services print Data Matrix on franked mail.

Plain Data Matrix or GS1 DataMatrix?

Choose Data Matrix for your own serial numbers, URLs or text. Choose GS1 DataMatrix from the type list when a regulator or retailer asks for GS1 data, such as GTIN, expiry and batch on medicines. Type it with Application Identifiers in brackets: (01)09521234543213(17)281231(10)ABC123(21)SN0001.

How to make one

  1. Type your text or data. Up to 1,500 characters works in this tool.
  2. Choose the cell size under Bar width: 0.5 mm suits most printed labels; go smaller only for high-resolution printing or marking.
  3. Download SVG or PDF for sharp printing at any size, or PNG.
Pallet racking in a distribution warehouse
Pallet racking in a distribution warehouse.

Questions

  • No. Both are 2D, but Data Matrix is more compact for short data, has no big corner squares, and is the standard for parts marking and medicines. QR codes are better known on consumer marketing.

  • Yes. Most phone barcode apps and many built-in camera scanners read Data Matrix.

  • Up to 2,335 letters or 3,116 digits, though codes stay easier to scan with less.

  • Mainly medicines and medical devices, carrying the GTIN, batch, expiry and serial number.