Skip to content

GS1 Data Matrix Generator with AI Checks

Free, with no sign-up: type GS1 element strings like (01)09506000134352(17)271231(10)LOT42, with each AI in brackets. The tool adds FNC1 for you, checks every Application Identifier including the GTIN check digit, and draws the GS1 DataMatrix as you type, ready to download as PNG or SVG. Nothing is uploaded.

Create a GS1 DataMatrix

See exactly what a scanner will read — before you print.

Write each element as an Application Identifier in brackets followed by its data, for example (01) GTIN, (17) expiry YYMMDD, (10) batch, (21) serial. FNC1 is added for you.

Free. No sign-up. No ads. Nothing uploaded.

DMRE (rectangular extension) sizes are not part of GS1 DataMatrix, so they are not offered here.

Output size

Exact size in mm, matched to your printer's dots.

Symbology ID—
Size (modules)—
Quiet zone (modules)—
Printer resolution—

Batch: many codes, ZIP or label sheet (free up to 100 per download)

Make a sequence

Label sheet or roll

Try any label to see the sheet. Free downloads start at label 1; starting later is part of Data Matrix Generator Pro.

Free, no sign-up. Codes are made in your browser; your text and CSV files are never uploaded.

Want more? Data Matrix Generator Pro makes up to 1,000 codes at once, numbered sequences of up to 1,000 codes, label sheets that start on any label, and a whole roll of thermal labels in one PDF. US$19.90 a month or US$129 a year, cancel any time.

Billing period

Free

For single codes and small batches.

US$0 forever

You're on Free

No account, nothing to install

The free version stays free. See pricing.

Have a license key?

What makes a Data Matrix a GS1 DataMatrix?

A GS1 DataMatrix is an ordinary Data Matrix ECC 200 symbol whose data starts with the FNC1 character and follows GS1 Application Identifier (AI) syntax. A scanner reports it with the symbology identifier ]d2, which tells the receiving system to split the data into AIs, the same way ]C1 does for GS1-128 (GS1 General Specifications, Table 5-34).

Without the leading FNC1 the same data is just text: a scanner sends “0109506000134352…” and the receiving system cannot tell a GTIN from a phone number. That is the most common mistake with GS1 codes made in general barcode tools.

Data Matrix ISO version ECC 200 is the only version that supports GS1 system data structures, including Function 1 Symbol Character (FNC1).

— GS1 General Specifications, section 5.6

Source: GS1 General Specifications, Release 26.0, section 5.6.

GS1 DataMatrix or plain Data Matrix: what the scanner reports

We encoded one element string three ways and read each symbol back the way a scanner does:

GS1 DataMatrix or plain Data Matrix: what the scanner reports
What was encodedSize (modules)Symbology identifierWhat your software receives
GS1 mode on this page, input (01)09506000134352(17)271231(10)LOT42(21)1234522 × 22]d201095060001343521727123110LOT42<GS>2112345
Same input with the brackets typed into a plain Data Matrix22 × 22]d1(01)09506000134352(17)271231(10)LOT42(21)12345
The digits without brackets in a plain Data Matrix20 × 20]d101095060001343521727123110LOT422112345

Only the first symbol is a GS1 DataMatrix: it starts with FNC1, so the scanner says ]d2 and a separator (<GS>) marks the end of the batch number. The other two scan without any error, which is why the mistake goes unnoticed until a warehouse or pharmacy system cannot split the data into AIs. The brackets are never part of GS1 data. Wondering whether a QR code would do? See Data Matrix vs QR code.

How to enter GS1 data

Write each element as its AI in brackets followed by the data, with no spaces. The brackets are not encoded; they only show where each AI starts.

  1. Start with the key, usually (01) and a 14-digit GTIN.
  2. Add the attributes: (17) expiry or (15) best before as YYMMDD, (10) batch or lot, (21) serial number.
  3. Fix anything the tool flags: a wrong check digit, a date that is not YYMMDD, too many characters, or a character outside the GS1 set.
  4. Download PNG or SVG, or open Batch to make one code per serial number.

The separator between a variable-length field such as (10) and the next AI is inserted by the encoder; you never type it.

Which Application Identifiers does the tool check?

The tool checks 34 common AIs against the formats published by GS1, with a clear message for each problem. Any other AI is still checked by the encoder’s built-in GS1 rules, with a shorter message. Common ones:

Which Application Identifiers does the tool check?
AIGS1 titleFormatCheck digit
(00)SSCCN18Yes
(01)GTINN14Yes
(10)BATCH/LOTX..20–
(11)PROD DATEN6–
(17)USE BY or EXPIRYN6–
(21)SERIALX..20–
(37)COUNTN..8–

In the format column, N14 means exactly 14 digits, X..20 means up to 20 characters from the GS1 character set, and N..8 up to 8 digits. Dates are YYMMDD.

Source: GS1 Application Identifiers reference.

How is the GTIN check digit calculated?

The last digit of a GTIN, SSCC or GLN is a check digit. Starting from the digit just left of it, multiply the digits alternately by 3 and 1, add them up, and subtract the total from the next multiple of 10. For 0950600013435 the weighted sum is 78, so the check digit is 2 and the GTIN is 09506000134352. The tool does this for every AI that GS1 marks as carrying a check digit and tells you the digit it expected.

Print size and quiet zone for GS1 DataMatrix

GS1 sets the module size (X-dimension) per application. For retail consumer packaging scanned by mobile devices, Table 5-46 gives 0.396 mm minimum, 0.495 mm target and 0.990 mm maximum. For regulated healthcare items not scanned at the retail point of sale, Table 5-52 allows 0.254 mm to 0.990 mm. The quiet zone is one module on all four sides.

For the margin around the code in millimetres, see the quiet zone guide.

Set Output size to millimetres, enter the module size and your printer’s dpi, and the tool rounds it to whole printer dots and shows the size you get; the SVG, PNG and PDF carry that size. Or export SVG and scale it in your label or artwork software so that one module lands in the range your application needs. For example, a 16 × 16 symbol at the 0.495 mm target is about 7.9 mm square before the quiet zone.

UDI and pharmaceutical packs

A medical device UDI has two parts. 21 CFR 801.40, Form of a unique device identifier calls them the device identifier and, where the label shows a lot or batch, serial number, manufacturing date or expiry date, the production identifier, and asks for the UDI in plain text and in automatic identification and data capture (AIDC) form without naming a symbology. In the GS1 system the device identifier is the GTIN, (01); the production identifier is whichever of (11) production date, (17) expiry date, (10) batch or lot and (21) serial number the label carries. A GS1 DataMatrix is the usual carrier on healthcare items.

EU rules for prescription medicines are stricter. Commission Delegated Regulation (EU) 2016/161, Articles 4 to 6 requires a Data Matrix on prescription medicines (except those listed in its Annex I, plus the non-prescription ones listed in Annex II), holding the product code, a serial number of up to 20 characters, the batch number, the expiry date and, where a country asks for it, a national number, and presumes compliance when print quality is rated at least 1.5 under ISO/IEC 15415. With GS1 syntax that is (01), (21), (10) and (17), which this tool checks.

This tool checks the data and draws the symbol. It does not grade print quality: that takes a verifier on the printed label. Check the rule for your product and market before you print.

Batches of serialised GS1 codes

For one code per item, open Batch, paste one element string per line (for example the same GTIN with a different (21) serial on each line) or load a CSV, and download a ZIP or an Avery label sheet. Every line is checked before anything is downloaded. Batches of up to 100 are free; Pro handles up to 1,000. Label sizes are on the Data Matrix labels page.

What this tool does not do

It does not assign GTINs: those come from your GS1 Member Organisation. It does not grade print quality; GS1 requires ISO/IEC 15415 verification for that, done with a verifier on the printed code. It does not make GS1 Digital Link URIs yet. For plain text or URLs without GS1 syntax, use the standard Data Matrix generator.

FAQ

GS1 is a registered trademark of GS1 AISBL. Avery is a registered trademark of Avery Products Corporation. This site is not affiliated with either.