Free generator

Free Data Matrix and GS1 DataMatrix generator

Data Matrix packs text or a web link into a small square; GS1 DataMatrix carries GS1 data such as a GTIN with its batch and expiry date. Choose either type in the generator, set the module size in millimeters and download SVG or PNG.

  • Free to use
  • No sign-up
  • No watermark
  • Personal and commercial use
  • Runs in your browser

Data Matrix 2D

Free · runs in your browser
Barcode type
Retail products
Cartons and logistics
Internal labels
2D

Any text or link. The square ECC 200 symbol grows with the data, from 10 × 10 modules. When to use Data Matrix

Ready.

The preview also updates as you type.

Preview · printed sizeScale in mm

Drawing…

Black on white only: colored bars and backgrounds are a common cause of scan failures. Everything is drawn in your browser; nothing you type is sent anywhere.

Printed size

The width of one square. The symbol grows with the data, from 10 × 10 modules; it needs at least 1 module of quiet zone. Data Matrix sizes explained

Download for your printer

SVG downloads at the printed size above, for design and label software. Free for personal and commercial use, with no watermark. Test a printed sample with the scanner that will read it.

  • Free to use
  • No sign-up
  • No watermark
  • Personal and commercial use
  • Runs in your browser

Data Matrix at a glance

VersionECC 200, with Reed-Solomon error correction
Square sizes24 sizes from 10 × 10 to 144 × 144 modules (the generator makes square symbols)
Rectangular sizes6 sizes from 8 × 18 to 16 × 48 modules; ISO/IEC 21471 (DMRE) adds more
Largest capacity3,116 digits, 2,335 alphanumeric characters or 1,556 bytes, in a 144 × 144 symbol
Error correctionFixed for each size, so there is no level to choose
Quiet zoneOne module on all four sides
ReadersTwo-dimensional imagers and camera scanners; most linear-only scanners cannot read it
SpecificationISO/IEC 16022:2024; GS1 General Specifications 5.6 for GS1 DataMatrix

The sizes and capacities are from section 5.6 of the GS1 General Specifications, which also says GS1 DataMatrix is read by two-dimensional imaging scanners or vision systems and that most other scanners cannot read it. GS1 US notes that not every smartphone camera reads Data Matrix, so some need a separate app.

Data Matrix or GS1 DataMatrix?

  • Data Matrix holds any text or a web address. GS1 uses plain Data Matrix only to carry a GS1 Digital Link web address, for example on retail packaging; the GS1 Digital Link generator makes those.
  • GS1 DataMatrix starts with the FNC1 character, which tells the scanner the data is a GS1 element string: Application Identifiers and their values, such as (01) GTIN, (17) expiry, (10) batch and (21) serial. A scanner reports it with the symbology identifier ]d2. GS1 lists it as the 2D barcode of choice for healthcare products at point of sale.

Printed examples

GS1 DataMatrix: GTIN 09520123456788, expiry 2027-12-31, batch ABC123. 20 × 20 modules; with the quiet zone, 10.9 mm square at GS1’s 0.495 mm target.
Data Matrix: the text PART-7731-A REV 4, 18 × 18 modules; 10.0 mm square with the quiet zone at 0.5 mm.

Sizes GS1 sets for GS1 DataMatrix

GS1 sizes the module (X) by where the code will be scanned. From the symbol specification tables:

Where it is scannedMinimum XTarget XMaximum XMinimum print grade
Retail packaging, next to the UPC or EAN (table 1)0.396 mm0.495 mm0.990 mm1.5/12/660
Retail point of sale and general distribution (table 3)0.743 mm0.990 mm0.990 mm1.5/20/660
Logistic units in general distribution (table 5)0.743 mm0.743 mm1.50 mm1.5/20/660
Regulated healthcare, retail (table 10)0.396 mm0.495 mm0.990 mm1.5/08/660
Regulated healthcare, not retail (table 6)0.254 mm0.380 mm0.990 mm1.5/08/660

GS1 notes that 2D symbols are printed at 1.5 times the X allowed for linear symbols because of how cameras capture them, and that on retail items the 2D code goes in addition to the barcode required at point of sale. Print grades need a verifier; see barcode verification grades.

What each setting does

  • Data (Data Matrix). Any text or link. Characters outside ASCII are encoded as UTF-8 with an ECI marker, which scanners that support ECI turn back into the original text. The generator stops at 1,500 bytes.
  • Data (GS1 DataMatrix). Application Identifiers in parentheses, checked the same way as for GS1-128: lengths, check digits, dates and GS1’s 82 characters. The GS1 DataMatrix encoder is stricter still: it also refuses AIs it does not know and combinations GS1 does not allow, such as (02) without (37), or (01) together with (02).
  • Module size. The width of one square. GS1 DataMatrix starts at 0.495 mm, plain Data Matrix at 0.5 mm. The PNG rounds it to whole printer dots and the readout shows the result.
  • Quiet zone. 1 module by default, the minimum; more never hurts.

Common mistakes

  • Making a plain Data Matrix when GS1 data is needed. Without FNC1 first, “0109520123456788” is just text to the scanner. Choose GS1 DataMatrix.
  • Modules too small for the printer. At 203 dpi a module is a whole number of 0.125 mm dots; GS1’s 0.396 mm minimum needs 4 dots (0.500 mm) there, since 3 dots would be 0.375 mm.
  • Text or a border inside the quiet zone. One module is not much; keep everything else clear of it.
  • Expecting every phone to read it. Test with the devices your users have, as GS1 US warns.

Worked example: GTIN, batch and expiry

  1. Choose GS1 DataMatrix and type (01)09520123456788(17)271231(10)ABC123. The fixed-length (01) and (17) come first, so only the batch is variable and needs no separator after it.
  2. The readout shows 20 × 20 modules, 10.9 mm square with the 1-module quiet zone at 0.495 mm.
  3. For a 300 dpi printer the PNG uses 6 dots per module, 0.500 mm. A scanner set to send symbology identifiers reports ]d2 before the AIs and their data.

Sources

  1. GS1: GS1 General Specifications Standard (Release 26.0) (accessed )
  2. ISO: ISO/IEC 16022:2024, Data Matrix bar code symbology specification (accessed )
  3. ISO: ISO/IEC 21471:2025, Data Matrix Rectangular Extension (DMRE) bar code symbology specification (accessed )
  4. GS1 US: The World of 2D Barcodes (accessed )
  5. GS1: 2D Barcodes at Retail Point-of-Sale Implementation Guideline (release 1.1.0) (accessed )

More tools for labels and numbers