GS1 DataMatrix Generator
Enter Application Identifiers in brackets, for example (01)09506000134352(17)261231(10)LOT1(21)12345, and generate a GS1 DataMatrix square code. The tool adds the leading FNC1, inserts separators after variable-length fields and exports PNG, SVG or PDF. Nothing is uploaded; encoding happens locally in your browser.
Generating…
Your data stays on your device.
How does it work?
- 1Type your data with Application Identifiers in brackets, for example (01)GTIN(17)YYMMDD(10)batch(21)serial.
- 2Check the valid/invalid indicator and fix any check-digit or length problem shown in the message.
- 3Adjust the scale and colours so the modules stay large enough for your marking or printing method.
- 4Download the code as PNG, SVG or a vector PDF.
What is GS1 DataMatrix Generator?
GS1 DataMatrix is the Data Matrix ECC 200 symbol used with the GS1 data structure. What sets it apart from an ordinary Data Matrix is an FNC1 character in the first position, which tells the scanner that the content is made of GS1 Application Identifiers rather than free text. Scanners report it with the symbology identifier ]d2, and that is how software knows to split the string into GTIN, date, batch and serial.
The typical string is (01) GTIN-14, (17) expiry date in YYMMDD, (10) batch or lot and (21) serial number. Fixed-length AIs such as (01) and (17) follow each other directly, while variable-length ones such as (10) and (21) are separated from the next field by the GS1 separator character (ASCII 29). Brackets are only how you type it; they are not stored in the symbol.
GS1 DataMatrix is standard in healthcare, where it identifies medicines and medical devices for serialisation and unique device identification (UDI), and it is also used for small items where a linear barcode would not fit. The symbol is square, from 10 by 10 up to 144 by 144 modules, and needs a quiet zone of one module on every side.
When should you use it?
- You are preparing pack marking for pharmaceutical serialisation with GTIN, batch, expiry and serial.
- A medical device label must carry UDI data in a two-dimensional symbol.
- The pack is too small for a GS1-128 linear barcode but still needs AI-structured data.
- You want to test how a scanner or software decodes a GS1 AI string before an actual print run.
GS1 DataMatrix versus plain Data Matrix
The bars are drawn the same way. The difference is the leading FNC1 and the AI structure: a plain Data Matrix carries free text, while a GS1 DataMatrix is read as structured GS1 data by any compliant scanner. If your content is not an AI string, use the standard Data Matrix tool instead.
Privacy
This tool runs in your browser. What you type, paste or open is processed on your device by JavaScript and is not sent to our servers, stored or shared. Your data stays on your device.
All encoding happens locally. The GTIN, batch and serial you type are never sent to a server, and the code contains only that data.
Frequently Asked Questions
Where does the FNC1 go?
It sits in the first position of the data, before the first AI, and the tool inserts it for you. For variable-length fields the GS1 separator (ASCII 29) is inserted between fields, except after the last one. You never have to type these control characters yourself.
How much data can it hold?
The ECC 200 symbol can hold up to about 3,116 digits, but real-life GS1 strings with a GTIN, batch, expiry and serial are usually a few dozen characters and give a compact symbol. Keep only the AIs you need.
Why does my scanner show the wrong fields?
Some scanners need GS1 processing enabled to read ]d2 data and interpret AIs. Check the scanner configuration, and check that variable-length AIs are not cut short; a batch number with accented letters or other characters outside the GS1 character set may not encode properly.
Related tools
Data Matrix Generator
Create square ECC 200 Data Matrix codes for tiny marking, from text or a URL
Open toolGS1-128 Barcode Generator
Encode GS1 Application Identifiers such as (01), (17) and (10) into a GS1-128 barcode.
Open toolSSCC-18 Barcode Generator
Generate SSCC-18 pallet and logistic-unit barcodes as GS1-128 with AI (00).
Open toolQR Code Generator
Turn any text, link or data into a static QR code with colours, logo and PNG/SVG/PDF export
Open toolBulk Barcode Generator
Paste up to 500 values, one per line, and export all barcodes as ZIP or PDF
Open toolBarcode Scanner Online
Scan EAN, UPC, Code 128, Data Matrix, PDF417 and more with your camera or an image
Open tool