Free
For single codes and small batches.
US$0 forever
You're on Free
No account, nothing to install
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.
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.
Cancel any time · 14-day refund
Cancel any time · 14-day refund
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.
Using it on another device?
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.
Free
For single codes and small batches.
US$0 forever
You're on Free
No account, nothing to install
Recommended
Pro
For label runs, long lists and whole rolls.
US$19.90 month
billed every month
Cancel any time · 14-day refund
US$129 year
≈ US$10.75/month, billed yearly
Cancel any time · 14-day refund
Or pay 129 USDT once for one year, no renewal
The free version stays free. See pricing.
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.
We encoded one element string three ways and read each symbol back the way a scanner does:
| What was encoded | Size (modules) | Symbology identifier | What your software receives |
|---|---|---|---|
GS1 mode on this page, input (01)09506000134352(17)271231(10)LOT42(21)12345 | 22 × 22 | ]d2 | 01095060001343521727123110LOT42<GS>2112345 |
| Same input with the brackets typed into a plain Data Matrix | 22 × 22 | ]d1 | (01)09506000134352(17)271231(10)LOT42(21)12345 |
| The digits without brackets in a plain Data Matrix | 20 × 20 | ]d1 | 01095060001343521727123110LOT422112345 |
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.
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.
The separator between a variable-length field such as (10) and the next AI is inserted by the encoder; you never type it.
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.
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.
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.
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.
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.
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.
GS1 is a registered trademark of GS1 AISBL. Avery is a registered trademark of Avery Products Corporation. This site is not affiliated with either.