GS1 Data Matrix Generator with AI Checks
Enter GS1 element strings like (01)09506000134352(17)271231(10)LOT42. The tool adds FNC1, checks every Application Identifier and draws the GS1 DataMatrix as you type.
Create a GS1 DataMatrix
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.
Batch: many codes, ZIP or Avery label sheet (free up to 5)
Free, no sign-up. Codes are made in your browser; your text and CSV files are never uploaded.
Data Matrix Generator Pro is unlocked in this browser.
Want more? Data Matrix Generator Pro makes batches of up to 1,000 codes at once: ZIP of PNG or SVG files and print-ready Avery label sheets. One payment of US$19.90, yours for good.
The free version stays free. See pricing.
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).
Source: GS1 General Specifications, Release 26.0, section 5.6.
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.
- Start with the key, usually (01) and a 14-digit GTIN.
- Add the attributes: (17) expiry or (15) best before as YYMMDD, (10) batch or lot, (21) serial number.
- 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.
- 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:
| AI | GS1 title | Format | Check digit |
|---|---|---|---|
| (00) | SSCC | N18 | Yes |
| (01) | GTIN | N14 | Yes |
| (10) | BATCH/LOT | X..20 | – |
| (11) | PROD DATE | N6 | – |
| (17) | USE BY or EXPIRY | N6 | – |
| (21) | SERIAL | X..20 | – |
| (37) | COUNT | N..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.
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.
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.
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 5 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
Do I need to type FNC1 or the GS separator?
No. The encoder puts FNC1 at the start and a separator after variable-length fields such as (10) and (21) when another AI follows.
Why does the tool say my check digit is wrong?
The last digit of a GTIN in (01) must equal the GS1 mod-10 check digit of the first 13 digits. The message tells you which digit was expected; usually a digit was mistyped or a 13-digit EAN was entered without its leading zero.
Can I leave the day out of an expiry date?
Yes. GS1 dates are YYMMDD, and when the day is not needed it is filled with 00, which GS1 reads as the last day of that month (General Specifications, date fields such as AI 17).
Which characters can a batch or serial number contain?
Letters A–Z and a–z, digits and a set of punctuation called GS1 character set 82. Spaces, # and accented letters are not allowed; the tool flags them.
Is a GS1 DataMatrix the same as a Data Matrix with a GS1 Digital Link URL?
No. A GS1 DataMatrix holds AI element strings behind FNC1. A Digital Link code holds a web address that contains the same keys. GS1 lists both, with the same size rules, for retail packaging.
Is my product data uploaded?
No. Validation and encoding run in your browser; nothing you type is sent anywhere.