Data Matrix Generator

Make a Data Matrix code online for free. Type any text, choose a square or rectangular symbol, and let the generator pick the smallest size or set one yourself. A capacity meter shows how much more fits, and you can download SVG, PNG, PDF or EPS at your printer's DPI.

Valid

7.9 × 7.9 mm at 300 DPI

Barcode

13 characters

Any text.

Symbol: 16 × 16 modules. 13 characters used; data like this fits up to 2,168 characters in the largest size.

Data Matrix options

Size and resolution

Output DPI

300 DPI · Thermal / offset

4 px per module at 300 DPI. Print size: 7.9 × 7.9 mm (0.31 × 0.31 in). PNG, WebP and JPEG: 96 × 96 px.

Label textNew

Font

Alignment

Printed in the file with the barcode, outside the quiet zone, in Helvetica or Courier so it looks the same in every format.

Colors

Contrast 21.0:1; estimated symbol contrast 100%.

Quiet zone (modules)4 · 4 · 4 · 4

Bar width reduction0 mil

Makes each bar thinner by this amount, to make up for ink that spreads on paper. Ask your printer for the value, or leave 0 for laser and thermal printing.

Rotation and backgroundNew0° · Filled

Rotation

In the preview, a checkered pattern shows the transparent areas. Print a transparent barcode only on a white or very light surface: scanners need the light quiet zone around it.

Margin and borderNew0 mm · no border

The margin is blank space outside the quiet zone, for cutting; the border is drawn at the outer edge. Both count in the print size.

Data inspectorNew13 chars
PresetsNew0 saved

No presets yet. Save the current settings to reuse them.

    Presets stay in this browser. They keep the type, size and style; the data and the logo are not saved.

    Recent barcodesNew0

    The barcodes you download appear here, newest first.

      The last 10 downloads, kept in this browser only.
      Data Matrix · Live previewValid
      Data Matrix barcode encoding barcode.codes
      New

      Scaled to fit. Actual size shows the print size on screen.

      Print simulationNew

      Shows how a worn print looks and tests it with the decoder.

      Type
      Data Matrix · 2D
      Print size
      7.9 × 7.9 mm
      Raster
      96 × 96 px
      Symbol
      16 × 16

      Download

      Vector drawing, 7.9 × 7.9 mm. Design and label programs place it at its print size.

      New
      More export optionsNewTest sheet · size set · embed code

      Print test sheet (PDF)

      The code at 80%, 100% and 150% with 100 mm and 4 in rulers. Print it at actual size and scan each copy before printing many.

      Size set (ZIP)

      Magnification

      Embed code

      Nothing you type is uploaded.New

      How to Generate a Data Matrix Code

      Type the data, choose the shape and size, check the capacity line, and download the file.

      1. Type the text, number or web address you want to encode.
      2. Choose Square or Rectangle, and a size, or keep Smallest that fits.
      3. Read the line under the data: the symbol size in modules and how many characters fit.
      4. Set the X-dimension for your printer, then download SVG, PNG, PDF or EPS and scan a test print.

      Data Matrix Sizes

      Data Matrix has 24 square and 6 rectangular sizes, and every size has its own capacity and error correction.

      Square Sizes

      • Smallest: 10 × 10 modules, for a few digits or letters.

        The smallest Data Matrix code, 10 × 10 modules, holding the six digits 123456.
      • Largest: 144 × 144 modules, for up to 3,116 digits or 2,335 capital letters and digits.

        The largest Data Matrix code, 144 × 144 modules, drawn here for the same six digits with the rest of the symbol filled.
      • In between: 22 more sizes, from 12 × 12 to 132 × 132 modules.

        A Data Matrix code of 32 × 32 modules, one of the sizes in between, holding 123456.

      Rectangular Data Matrix Codes

      • Sizes: 8 × 18, 8 × 32, 12 × 26, 12 × 36, 16 × 36 and 16 × 48 modules.
      • Use: narrow spaces on a label.
      • Largest: 16 × 48 modules hold 98 digits or 72 capital letters and digits.
      A rectangular Data Matrix code holding BC-2026-0042, wider than it is tall.
      A rectangular Data Matrix code for BC-2026-0042.

      Data Matrix Specifications

      These are the rules of Data Matrix ECC 200 as described in the encoder's reference, which cites ISO/IEC 16022.

      Data Matrix at a glance
      PropertyData Matrix
      DigitsUp to 3,116 digits in the largest symbol (144 × 144 modules)
      CharactersAny data, ASCII and extended ASCII; readers use ISO/IEC 8859-1 unless an ECI says otherwise
      Check digitNo check digit: error correction is built into every size (ECC 200)
      Sizes24 square sizes from 10 × 10 to 144 × 144 modules, and 6 rectangular sizes from 8 × 18 to 16 × 48
      Capacity in this generator144 × 144: 3,116 digits or 2,335 capital letters and digits; 16 × 48: 98 digits or 72 capital letters and digits
      VariantsData Matrix Rectangular and its Rectangular Extension, GS1 DataMatrix, GS1 Digital Link Data Matrix, HIBC Data Matrix and Royal Mail Mailmark
      Other character setsExtended Channel Interpretation (ECI) indicators switch readers to another code page, where the reader supports them
      Structured dataThe encoder compresses ISO/IEC 15434 structured data with the 05 and 06 Macro codewords
      StandardsISO/IEC 16022 and ANSI/AIM BC11
      Where the numbers come fromYour own data
      ExampleBC-2026-0042

      BWIPP Data Matrix reference (sizes, variants, data, ECI, structured data, standards); capacities measured with this generator's encoder (test/phase8.test.ts).

      Sources, checked 2026-10-04: Data Matrix reference (BWIPP, the encoder bwip-js implements).

      Data Matrix vs QR Code

      Both are 2D matrix codes; Data Matrix can also be rectangular and starts smaller, while QR Code holds more data and lets you choose the error correction level.

      Data Matrix and QR Code in this generator
      PropertyData MatrixQR Code
      Smallest symbol10 × 10 modules21 × 21 modules
      Largest symbol144 × 144 modules177 × 177 modules
      Most digits3,1167,089 (error correction L)
      ShapesSquare or rectangularSquare
      Error correctionFixed by the sizeChosen: L, M, Q or H

      Which One to Choose

      Choose Data Matrix for small labels where space is tight or the code must be rectangular. Choose QR Code when you need more data or a chosen error correction level.

      Data Matrix vs QR code size, capacity and error correction compared in full.

      Printing Data Matrix Codes

      Keep at least one module of blank space around the code and print each module as a whole number of printer dots.

      Module Size and Quiet Zone

      The X-dimension is the width of one square module. The generator turns it into whole printer dots at the DPI you choose and warns when the quiet zone is below one module, the minimum GS1 sets for GS1 DataMatrix.

      Check the Capacity

      The line under the data shows the symbol size and how many characters of data like yours fit. When the data is too long for a fixed size, the generator says so instead of drawing a broken code.

      Frequently Asked Questions

      Is This Data Matrix Generator Free?

      Yes. There is no account, watermark or download limit, and the codes may be used commercially.

      What Is ECC 200?

      ECC 200 is the name of the Data Matrix version this generator makes, with error correction built into every size. The encoder's reference lists Data Matrix ECC 200 as another name for Data Matrix.

      How Much Data Fits in a Data Matrix Code?

      The largest square symbol holds 3,116 digits or 2,335 capital letters and digits in this generator. Text with lowercase letters and symbols fits fewer characters; the capacity line shows the limit for your data.

      Can a Phone Read a Data Matrix Code?

      A scanner app that supports Data Matrix can. The Barcode.codes scanner and reader read Data Matrix in the browser, from the camera or from a photo.

      Should I Use GS1 DataMatrix Instead?

      Use GS1 DataMatrix when the code carries GS1 data such as a GTIN, batch or expiry date for trading partners. The generator offers it as a separate type.

      Why Is My Data Matrix Code Rectangular?

      You chose Rectangle, which suits narrow spaces. Choose Square to get a square symbol again.