---
title: "GS1 DataMatrix Generator – Free GTIN, Lot & Expiry"
description: "Free GS1 DataMatrix generator. Encode GTIN, batch, expiry and serial number as (AI)value pairs, for pharma, medical devices and food. Download PNG, SVG or PDF."
url: https://barcodejar.com/gs1-datamatrix-generator
source: BarcodeJar (free barcode tools)
---

# GS1 DataMatrix Generator

Create a GS1 DataMatrix code from your GTIN, expiry date, batch and serial number. Type the data as (AI)value pairs, and the generator adds FNC1 and checks your data against GS1 rules.

_Interactive tool: open https://barcodejar.com/gs1-datamatrix-generator to use it in your browser. It is free with no sign-up._

## How to create a GS1 Data Matrix barcode

1.  Enter your data in the box above. Type each AI in parentheses followed by its value, with no spaces, e.g. (01)09506000134352(17)271231(10)LOT42A(21)SN7781. GTIN check digits must be correct and dates must be valid YYMMDD.
2.  The barcode updates live as you type. Open **Customize** to change the bar height, colors, rotation or quiet zone.
3.  Click **Download PNG** for labels and documents, or **SVG / PDF** for print and packaging design.
4.  Test it with our [online barcode scanner](https://barcodejar.com/barcode-scanner) before you print a large run.

## What is a GS1 Data Matrix barcode?

A **GS1 DataMatrix** is a [Data Matrix](https://barcodejar.com/data-matrix-generator) (ECC 200) code that starts with the FNC1 character and contains GS1 Application Identifiers. Scanners recognise it as GS1 data and split it into fields such as GTIN (01), expiry date (17), batch (10) and serial number (21).

It is the standard 2D barcode for pharmaceutical serialisation, including the US Drug Supply Chain Security Act (DSCSA) and the EU Falsified Medicines Directive, and for Unique Device Identification (UDI) on medical devices. It holds a lot of data in a very small square and has Reed-Solomon error correction, so it still scans when partly damaged. GS1 also lists it as one of the 2D barcodes for retail point of sale.

## Where GS1 Data Matrix is used

-   Prescription medicine packs (DSCSA, EU FMD serialisation)
-   Medical device UDI labels
-   Surgical instruments and direct part marking
-   Food and fresh produce with batch and expiry data
-   Retail items moving to 2D barcodes at point of sale
-   Industrial and electronics component traceability

## GS1 Data Matrix specifications

-   **Type:** 2D matrix, square (ECC 200)
-   **Data:** GS1 Application Identifiers, starting with FNC1
-   **Capacity:** Up to 3,116 digits or 2,335 alphanumeric characters (largest size)
-   **Error correction:** Reed-Solomon, built in
-   **Sizes:** 10×10 to 144×144 modules, chosen automatically
-   **Human-readable:** Print the AI data in text next to the code
-   **Standard:** ISO/IEC 16022, GS1 General Specifications

## Tips for a barcode that scans first time

-   Print the key data (GTIN, expiry, batch, serial) as human-readable text next to the code, as most regulations require.
-   Keep a quiet zone of at least one module on all sides; more is safer.
-   Use a dark code on a light background. Inverted (light on dark) codes are not read by every scanner.
-   Put fixed-length AIs such as (01) and (17) first and variable-length AIs such as (10) and (21) at the end to keep the code small.

## Frequently asked questions

### What is the difference between GS1 DataMatrix and Data Matrix?

A GS1 DataMatrix is a Data Matrix code that starts with FNC1 and contains data in GS1 Application Identifier format. A plain [Data Matrix](https://barcodejar.com/data-matrix-generator) can hold any text. Regulators and trading partners that ask for GS1 DataMatrix need the GS1 format.

### What data goes in a pharmaceutical GS1 DataMatrix?

Usually four elements: GTIN (01), expiry date (17), batch or lot (10) and serial number (21). For example `(01)09506000134352(17)271231(10)LOT42A(21)SN7781`.

### How do I type the FNC1 separator?

You do not need to. Type the AIs in parentheses and the generator inserts FNC1 at the start and after any variable-length value that is followed by another AI.

### Can a GS1 DataMatrix be scanned at a store checkout?

Increasingly, yes. Many retailers are upgrading to 2D imaging scanners as part of the GS1 move to 2D barcodes at point of sale. Check with your retailer, and keep an EAN-13 or UPC-A on pack during the transition.

### What size should a GS1 DataMatrix be?

It depends on how much data it holds and how it is printed. GS1 sets module size ranges for each application, such as healthcare and retail. Download SVG or PDF so the code scales without blur.

### Is GS1 DataMatrix required for medical devices?

The FDA and EU UDI rules require a UDI in both human-readable and machine-readable form. GS1 DataMatrix is one accepted carrier when you use GS1 as your issuing agency; [GS1-128](https://barcodejar.com/gs1-128-barcode-generator) is another.

## Related free tools

[![Data Matrix Generator example](/thumbs/datamatrix.svg)**Data Matrix Generator**Create Data Matrix barcodes free. PNG, SVG, PDF.](https://barcodejar.com/data-matrix-generator)[![GS1-128 Generator example](/thumbs/gs1-128.svg)**GS1-128 Generator**Create GS1-128 barcodes free. PNG, SVG, PDF.](https://barcodejar.com/gs1-128-barcode-generator)[![GS1 Digital Link Data Matrix Generator example](/thumbs/gs1dldatamatrix.svg)**GS1 Digital Link Data Matrix Generator**Create GS1 Digital Link Data Matrix barcodes free. PNG, SVG, PDF.](https://barcodejar.com/gs1-digital-link-data-matrix-barcode-generator)[![GS1 Data Matrix Rectangular Generator example](/thumbs/gs1datamatrixrectangular.svg)**GS1 Data Matrix Rectangular Generator**Create GS1 Data Matrix Rectangular barcodes free. PNG, SVG, PDF.](https://barcodejar.com/gs1-data-matrix-rectangular-barcode-generator)[![GS1 QR Code Generator example](/thumbs/gs1qrcode.svg)**GS1 QR Code Generator**Create GS1 QR Code barcodes free. PNG, SVG, PDF.](https://barcodejar.com/gs1-qr-code-generator)[**GTIN Check Digit Calculator**GTIN-8, 12, 13 and 14 check digit calculator.](https://barcodejar.com/gtin-check-digit-calculator)[![HIBC Data Matrix Generator example](/thumbs/hibcdatamatrix.svg)**HIBC Data Matrix Generator**Create HIBC Data Matrix barcodes free. PNG, SVG, PDF.](https://barcodejar.com/hibc-data-matrix-barcode-generator)[**What Is a GTIN?**GTIN-8, 12, 13 and 14 in plain English.](https://barcodejar.com/guides/what-is-a-gtin)
