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 · Serialization

Checking your session…

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 serialization 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.