Skip to content

GS1 DataMatrix generator

Enter GTIN, expiry date, batch and serial number; the check digit and field rules are validated and a GS1 DataMatrix (ECC 200) is generated. Download SVG or PNG for a single code, or paste a list and open a printable sheet.

Free tool · Serialisation
Input mode

Enter 8, 12, 13 or 14 digits including the check digit; it is padded to 14 digits for field (01).

Check digit

Check digit is correct. Field (01): 09506000134352

Pick a date; it is written as YYMMDD inside the code. If left empty the field is omitted.

Up to 20 characters. GS1 character set: letters, digits and ! " % & ' ( ) * + , - . / : ; < = > ? _ (no spaces).

Up to 20 characters, same character set.

Additional fields (optional)

No additional fields.

For example (11) production date, (15) best before date, (240) additional product identification, (30) count. An unknown identifier raises an error.

Output settings

Symbol shape

Edge of one module in PNG and SVG downloads.

Written into the PNG file; print software reads the physical size from it.

At least 1 module on every side for ECC 200.

Module edge of the symbols on the batch sheet.

Encoding runs only in your browser; the data you enter is never sent to a server.

Preview

GS1 DataMatrix: (01)09506000134352(17)281231(10)LOT2026A(21)ABC123XYZ

PNG: 192 × 192 pixels, about 16.3 × 16.3 mm at 300 DPI

Fields

AIValueName
(01)09506000134352GTIN (global trade item number)
(17)281231Expiration date
(10)LOT2026ABatch / lot number
(21)ABC123XYZSerial number
Symbol size
22 × 22
Module count
484 (22 × 22)
Data regions
1 (1 × 1), 20 × 20
Capacity
30
Codewords
30 data (30 used, 0 padding) + 20 error correction

Raw data a reader should return (separator <GS>)

]d201095060001343521728123110LOT2026A<GS>21ABC123XYZ

Codewords (decimal)

232 131 139 180 190 130 143 173 182 147 158 142 161 140 77 80 85 150 156 66 232 151 66 67 68 142 52 89 90 91 165 216 94 12 56 81 103 140 11 236 202 137 121 184 192 54 34 216 28 205

Data (232 = FNC1, 129 onwards may be padding) followed by the error correction codewords.

The symbol on screen is ideal. In production the printer, print quality and reader decide: this tool is for design and testing. Check printed codes with a verifier that grades to ISO/IEC 15415 and with your own readers.

Want to produce these codes on your line, verify them with printers and cameras and match them to your database? Let us design your serialisation flow together.

Request a call

01

How to use

  1. A

    Enter the GTIN and let the check digit be verified or calculated. Pick the expiry date, enter batch and serial number, and add other identifiers (AI) if needed.

  2. B

    Check the symbol size, the codewords and the human-readable lines in the preview. If a rule is broken, the message tells you which field is wrong and why.

  3. C

    Download SVG or PNG (module pixels and DPI selectable). For many codes, paste the list and open the printable sheet.

02

What is GS1 DataMatrix?

GS1 DataMatrix carries data structured with GS1 application identifiers (AI) in an ECC 200 Data Matrix symbol (ISO/IEC 16022): the product number GTIN (01), expiration date (17), batch (10), serial number (21) and so on. A special FNC1 character at the start marks the symbol as GS1 data; readers report this with the ]d2 symbology identifier.

If another field follows a variable-length field (batch, serial number), an FNC1 is placed in between again; the reader returns it as ASCII 29 (GS) in the raw data. After fixed-length fields (GTIN, dates) no separator is needed. This structure is used in pharmaceutical serialisation and medical device identification (UDI); which fields are mandatory depends on the country and regulation, so check the authority's current guidance.

03

Field order, separators and check digit

GS1 recommends writing fixed-length fields first and variable-length fields last. This reduces the number of separators and often makes the symbol one size smaller. The tool does this by default; if you turn it off, fields stay in your order and separators are still placed correctly.

The last digit of a GTIN is a modulo 10 check digit. The tool either verifies the check digit of the number you typed or calculates and appends it. Dates use the YYMMDD format; a day of “00” means the last day of the month in GS1. Batch and serial number are limited to GS1 character set 82: no spaces and no accented letters.

04

Why test before production?

This tool encodes the symbol according to ISO/IEC 16022 ECC 200; the printed result depends on the printer, the dot-to-module ratio, contrast, surface and quiet zone. The quality of a printed code is graded by a verifier working to ISO/IEC 15415; direct part marking (DPM) has separate rules.

The encoder uses ASCII encoding only (no C40, Base 256 and similar). Because GS1 data is mostly digits this is usually sufficient; for very long upper-case text other encodings can give a smaller symbol. Do not use production codes without testing them with your own readers and a verifier.

FAQ

Is my data sent anywhere?
No. Encoding and validation run entirely in code in your browser; the GTIN, batch and serial numbers you enter are not transmitted to any server and are not stored.
Does the generated code comply with GS1 and ISO rules?
Encoding follows the ISO/IEC 16022 ECC 200 algorithm, FNC1 marks it as GS1, and the fields are checked against the length, character set, date and check digit rules of the GS1 General Specifications. This is not a certificate of conformance; printed codes must be tested with a verifier and readers.
Why is the GTIN padded to 14 digits?
In GS1 DataMatrix field (01) is always 14 digits. GTIN-8, GTIN-12 and GTIN-13 numbers get leading zeros to reach 14 digits; the check digit does not change.
Why do some codes come out smaller?
In ASCII encoding two consecutive digits fit into one codeword, so mostly numeric data needs a smaller symbol. Ordering fixed-length fields first also reduces the number of separators.
Can I use a rectangular symbol?
The tool produces all six rectangular sizes of ISO/IEC 16022. Square symbols are preferred, though; choose a rectangular shape only if space is limited and the GS1 rules for your application allow it.
How many millimetres should the symbol be?
The required size depends on the application and the printer. Our DataMatrix size and print calculator works out the whole number of dots per module and the symbol dimensions for a given printer resolution.

Code generation and verification on your line

Our serialization software talks directly to printers and cameras, prevents duplicate codes and tracks case–pallet aggregation end to end.