Skip to content
brownie.tools

Data Matrix Generator

Square or rectangular Data Matrix and GS1 DataMatrix, checked and printed at true size.

Mode

Your Data Matrix appears here.

Test it in Barcode Reader

Shape
px
modules
Color
Background
mm

GS1 healthcare labels use 0.255–0.495 mm, target 0.380 mm. Smaller modules need a sharper printer.

Runs locally in your browser. Nothing is uploaded or sent to a server.

Type text or a part number, or switch to GS1 and fill in GTIN, expiry date, batch and serial. The generator checks each field, adds the GS1 separators for you and draws a square or rectangular Data Matrix. Download SVG or transparent PNG, or print it at an exact module size in millimetres. Everything runs in your browser.

Updated

When should you use Data Matrix instead of a QR code?

Both are two-dimensional codes, but they are built for different jobs. Data Matrix starts at 10 × 10 modules and has no large corner squares, so it fits on circuit boards, surgical instruments, vials and small labels. QR codes start at 21 × 21 modules and are what phone cameras open by default for links. Pick Data Matrix for parts, products and regulated labels; pick the QR Code Generator for links people will scan with their phones.

QuestionData MatrixQR code
Smallest symbol10 × 10 modules (rectangular sizes too)21 × 21 modules
Finder patternL-shaped border plus timing edgesThree corner squares
Typical usePart marking, pharma and medical labels, logisticsLinks, payments, Wi-Fi, menus
GS1 versionGS1 DataMatrix, prefix ]d2GS1 QR Code, prefix ]Q3

Which GS1 fields does the generator check?

GS1 mode lists the Application Identifiers most labels need: SSCC (00), GTIN (01), content GTIN (02), batch or lot (10), production, packaging, best-before, sell-by and expiry dates (11, 13, 15, 16, 17), serial (21), counts (30, 37), additional and customer part numbers (240, 241), order number (400), GLN (414) and GIAI (8004). GTIN, SSCC and GLN check digits are verified, and an 8, 12 or 13 digit GTIN is padded to 14 digits. Dates must be real YYMMDD dates, where a day of 00 means the end of that month. Text fields accept the GS1 character set except parentheses, which mark field numbers, and stop at their maximum length. GTIN (01) and content GTIN (02) can't appear in the same code. A field with a problem shows its message right under it, and no code is drawn until every field is valid.

Why does my scanner show ]d1 or strange characters?

A scanner reports ]d1 for a plain Data Matrix and ]d2 for GS1 DataMatrix. If a code you expected to be GS1 reads as ]d1, it was built without the FNC1 start character, which happens when the data is typed as text with brackets. Group separators are control characters, so some scanners show them as a box, a space or nothing at all; check the scanner's GS1 or FNC1 setting. This generator always builds GS1 codes with a real FNC1, and the Scanner returns line shows the expected output.

Square or rectangular?

Square Data Matrix sizes run from 10 × 10 to 144 × 144 modules, always an even number. Rectangular sizes from 18 × 8 to 48 × 16 suit narrow areas like the edge of a label or a cable. Most label specifications and healthcare guidelines expect square symbols, so Square is the default; choose Rectangle when the space is long and thin. The generator picks the smallest symbol that holds your data and shows its size under the preview.

How do you print a Data Matrix that scans?

Print at 100 % scale with no fit-to-page scaling, keep the quiet zone clear, and use dark modules on a light background with strong contrast. Thermal printers at 203 dpi print a module of about 0.125 mm per dot, so a 0.38 mm module spans three dots; very small modules need a 300 or 600 dpi printer. Scan a test label with a camera-based imager before printing the full batch, or open the downloaded file in Barcode Reader. For linear codes such as UPC or Code 128, use the Barcode Generator; for many codes from a list, use the Bulk Barcode Generator.

How to Use Data Matrix Generator

  1. Choose text or GS1

    Keep Text or URL for serial numbers, part numbers, links or any text. Choose GS1 when the code goes on a regulated product label and must carry Application Identifiers such as GTIN (01), expiry (17), batch (10) and serial (21).

  2. Enter the content

    Type the text, or fill one row per GS1 field. You can also paste a string such as (01)09506000134352(17)261231(10)ABC123 and click Use. Each field is checked: GTIN check digit, YYMMDD dates, allowed characters and maximum length.

  3. Pick the shape and look

    Square is the default and what most scanners and label specs expect. Rectangle fits narrow spaces such as a cable or a vial edge. Set the module size, the quiet zone and the colours; the preview updates as you type.

  4. Download or print

    Download SVG for label software and print shops, PNG with or without a transparent background, or copy the SVG. To print at true size, enter the module size in millimetres and click Print at this size.

  5. Test the code

    Open the result in Barcode Reader or scan a test print with a camera-based scanner at its final size before printing a full run. Laser scanners built only for linear barcodes cannot read Data Matrix.

Frequently Asked Questions

Data Matrix is a two-dimensional barcode made of square modules with an L-shaped solid border on two sides and a dotted timing pattern on the other two. It uses ECC 200 Reed-Solomon error correction, so a code can still be read when part of it is damaged. It stores up to 3,116 digits or 2,335 letters and fits on very small parts, labels and packages.

GS1 DataMatrix is a Data Matrix whose first character is the special FNC1 codeword and whose content follows GS1 Application Identifiers, such as (01) for the GTIN and (17) for the expiry date. Scanners report it with the prefix ]d2. A plain Data Matrix holds any text. Use GS1 mode only when a trading partner, a pharmacy system or a regulation asks for GS1 data.

You don't. In GS1 mode you enter each field in its own row, and the generator adds the leading FNC1 and the separator after every variable-length field such as batch (10) or serial (21). The preview shows what a scanner returns, with each separator drawn as ⟨GS⟩, so you can compare it with your label specification.

Size comes from the module size, the width of one square. The GS1 DataMatrix guideline sets 0.255 to 0.495 mm for regulated healthcare labels, with 0.380 mm as the target, and asks for a quiet zone of at least one module on every side. Enter the module size in millimetres to see the printed size and print the code at exactly that scale.

No. The Data Matrix encoder runs as WebAssembly inside your browser tab and the code is drawn on your device. Product numbers, batch numbers and serial numbers are never sent to a server, and no account or watermark is involved.