DataMatrix generator: codes on A4 or US Letter sheets
DataMatrix is a square 2D code for part numbers and GS1 product codes. Every line of the list becomes one code with a caption, and the generator lays the codes out on a print-ready A4 or US Letter sheet as a PDF, SVG or PNG, with no sign-up.
- The text before "|" goes into the code, and the text after it becomes the caption.
- The "GS1 DataMatrix" checkbox puts FNC1 first for GS1 product codes.
- Up to 1,500 lines at once, pasted or imported from TXT, CSV or Excel (XLSX). Each line takes up to 1,000 bytes.
- Side from 1 to 15 cm, 2 cm by default.
- Sheet formats A4, A3, A5, A6 and US Letter. Output: PDF, SVG sheets, an SVG or a PNG per code.
How to print DataMatrix codes on a sheet
- Paste the lines. One line is one code. The text before the vertical bar "|" goes into the code: a part number or a GS1 string. The text after "|" becomes the caption under the code. For a long list, import a TXT, CSV or Excel (XLSX) file. In a CSV or XLSX file the second column becomes the caption. If your GS1 strings come in a CSV file, keep them as the only column, because a semicolon, comma or quotation mark inside a serial number can throw off the column split.
- Check GS1 for product codes. The "GS1 DataMatrix" checkbox is under the list. With it the code starts with FNC1, and the marker <GS> in a line becomes the field separator. Write <GS> after a variable-length field, such as a batch number, when another field follows it. Leave it unchecked for links and plain text.
- Set the side and download the sheet. Set the side of the code in the form step "Look and size": 2 cm (0.8 in) by default, presets of 1.5, 2 and 3 cm, any value from 1 to 15 cm. This page opens the form with cut marks on. Click "Download PDF" and print at 100% scale, with "Fit to page" off.
What DataMatrix is used for
GS1 DataMatrix is the code on prescription drug packs (DSCSA in the US, FMD in the EU) and on packaging where an EAN-13 barcode has no room for the batch and the serial number. The string with the GTIN and the other fields comes from your labeling records. Paste those strings as a list and check "GS1 DataMatrix".
In a warehouse or a workshop the code carries an asset number or a link to the item's record in your inventory system. A short number gives a small code, so a phone reads it from a 1.5 cm label. An item name with accented letters or symbols like ° is safer in the caption, because a scanner app may garble them. Import the file with the numbers, as on the page QR codes from Excel, and the caption comes from the second column. The article on labels for inventory and asset tags walks through a real asset list.
The generator also makes linear barcodes on the same grid. For SKUs with letters and hyphens, open the "Code128" tab or the Code 128 barcode generator with the presets already set. For QR codes on sheets, the page printing QR codes on a sheet lists the grids for A4 and US Letter.
Frequently asked questions
What is <GS> and where do I put it?
It is the GS1 field separator. A GS1 string is a chain of application identifiers with their values, and a separator has to close every variable-length field, such as a batch number (10) or a serial number (21), unless that field is the last one. In the form you type it as the marker <GS>, in upper or lower case. The marker works only with "GS1 DataMatrix" checked. Without it the four characters stay plain text, and with it a line takes letters, digits, spaces and ASCII punctuation only.
Do I need "GS1 DataMatrix" for plain text?
No. A link, a part number or any other text prints with the box unchecked, and the generator puts no FNC1 at the start of the code. The checkbox is for codes built to the GS1 standard, the ones on drug packs and on retail items with a GTIN.
Where do the GTIN, batch and serial numbers come from?
From your GS1 membership and your own records. The generator does not issue numbers and does not register anything. It draws the code from the line you paste. Take the string from your labeling software or build it following the GS1 General Specifications, then read one printed code with a scanner app that shows the parsed fields.
What size should I print a DataMatrix code?
The link https://qrsetter.com gives a code of 18×18 modules, and at 2 cm one module is 1.1 mm. A GS1 string of about 40 characters gives 22×22 modules, with a module of 0.9 mm at 2 cm and 0.7 mm at 1.5 cm. A part number like INV-000123 fits in 14×14 modules, so at 1.5 cm its module is still wider than 1 mm.
How many DataMatrix codes fit on a sheet?
At a 2 cm side with the default margins, 40 codes fit on A4 without captions and 35 with them. On US Letter it is 35 without captions and 30 with them. At 1.5 cm, A4 takes 54 without captions and 48 with them, and Letter takes 54 without captions and 42 with them. At 3 cm, A4 takes 24 without captions and 20 with them, and Letter takes 20 in both cases.
How much data fits in one code?
Up to 1,000 bytes per line. The code grows with the line, from 10×10 to 144×144 modules, and stays square.
Is an office printer good enough for GS1 codes?
The GS1 specifications set a minimum print quality grade under ISO/IEC 15415, and only a barcode verifier measures it. An office printer and a scanner app tell you that the code reads, not what grade it gets. For internal labels that is enough. Print one sheet, read the codes, then print the run. For drug or device packaging, have a sample graded before the run.