GS1 DataMatrix generator
GS1 DataMatrix is a compact square or rectangular 2D barcode carrying a GTIN or other GS1 identifier with data such as an expiry date, batch number or serial number. It is used for many applications within the GS1 system, including on medicine packs, medical devices, tobacco packs, directly marked parts and returnable assets.
Enter each element as its Application Identifier (AI) in parentheses followed by its value. Invalid data is refused.
Sizing information is prescribed by application specifications.
Specific sizes per application
Sizes for each use, from the General Specifications.
| Application | X-min | X-nom | X-max | |
|---|---|---|---|---|
| Regulated healthcare non-retail consumer trade items not scanned in general distribution (SST 6) | 0.254 mm | 0.380 mm | 0.990 mm | |
| Direct part marking A, connected finder modules (e.g. laser or chemical etching) (SST 7) | 0.100 mm | 0.200 mm | 0.300 mm | |
| Direct part marking B, non-connected finder modules (e.g. dot peen) (SST 7) | 0.200 mm | 0.300 mm | 0.495 mm | |
| Trade items scanned in retail or non-retail pharmacy and general distribution (SST 8) | 0.750 mm | 0.750 mm | 1.520 mm | |
| GS1 keys GDTI, GRAI, GIAI and GLN (SST 9) | 0.375 mm | 0.375 mm | 0.743 mm | |
| Regulated healthcare retail consumer trade items not scanned in general distribution (SST 10) | 0.396 mm | 0.495 mm | 0.990 mm | |
| GS1 GSRNs (SST 11) | 0.254 mm | 0.380 mm | 0.495 mm | |
| EU Regulation 2018/574 tobacco traceability, unit packs (SST 12) | 0.380 mm | 0.380 mm | 0.990 mm | |
| EU Regulation 2018/574 tobacco traceability, aggregations of unit packs (SST 12) | 0.750 mm | 0.750 mm | 1.520 mm |
GS1 identifiers
| AI | Identifier |
|---|---|
| (01) | Global Trade Item Number (GTIN), for trade items. |
| (00) | Serial Shipping Container Code (SSCC), for logistic units. |
| (8003) | Global Returnable Asset Identifier (GRAI), for returnable assets. |
| (8004) | Global Individual Asset Identifier (GIAI), for individual assets. |
| (8017) and (8018) | Global Service Relation Number (GSRN), for service providers and recipients, such as hospital staff and patients. |
Variants
| Case | Note |
|---|---|
| A rectangular symbol | Use GS1 DataMatrix Rectangular. |
| Data Matrix with a GS1 Digital Link URI | Use GS1 Digital Link Data Matrix. |
Making this hugely popular barcode generator freely available consumes a rapidly increasing amount of resources at the owner's expense. If you think this tool is worthy of a donation then please consider making a small contribution to support its availability. (A PayPal account is not required. Bitcoin is also accepted.)
Frequently Asked Questions
Is this barcode generator free?
Yes, with no sign-up, if you want to generate individual codes. For bulk generation or automated scripting, you will need a license to use the HTTP API. With such a license you can also connect the tool to your AI agent as an MCP server.
Can I turn a link into a QR Code?
Yes. A QR Code can hold a web address that a phone opens when scanned. Use QR Code for social media and other URLs, and QR Code with GS1 Digital Link for GS1 Digital Link URIs.
Is the barcode check digit added for me?
A check digit lets a scanner detect a misread. Fixed-length formats that require one, such as EAN, UPC, ISBN and ITF-14, handle it for you: leave it off and it will be calculated and added, or include it and it will be verified. For variable-length formats where it is optional, such as Code 39, choose “Add checksum”, and “Display checksum” to show it in the text. GS1 Application Identifier data must include its check digits.
Is my industry-specific barcode data checked?
Yes, for GS1 variant formats such as GS1-128, GS1 DataMatrix and QR Code with GS1 Digital Link, covering both Application Identifier (AI) syntax and GS1 Digital Link URIs, and for HIBC, PPN-Code, PZN and VIN.
Which barcode file format should I use?
- PDF or EPS for Illustrator, InDesign and other layout software.
- SVG for the web.
- PNG, TIFF or JPEG for label and other software that requires bitmap images.
- EMF for Word, Excel and PowerPoint.
What size should a barcode be printed?
A printed barcode must suit how it will be scanned, so application specifications set its size. Under “Customisation”, choose “Strict Spec.” and an application, whether a GS1 Symbol Specification Table (SST) or another specification, to size it to those specifications, with the X-dimension checked against the specification. You can also control bar width reduction, quiet zones and magnification. Once you finalise, the print checklist shows the printed size, X-dimension and quiet zone.
Which barcode size mode should I choose?
A barcode for print has a physical size set by its specification, while one for the screen is measured in modules. For print, choose “Strict Spec.”, which draws the barcode at its specified physical size and refuses settings that break the specification. “Loose Spec.” also uses the physical size, but falls back rather than refusing. “Norm.” draws one point per module with no physical size, and “Prop.” does the same with the specification’s height ratio.
Should a barcode image use pixels/module or DPI?
A barcode image scans best when every module is a whole number of pixels. For PNG, JPEG and TIFF files, pixels/module sets this directly for the screen, with no physical size, while DPI makes an image at a physical size for printing at that resolution.
What is the “X-dimension” of a barcode?
The X-dimension is the width of the narrowest bar or module in a barcode. It sets the size of the whole barcode, and application specifications define its acceptable range, from X-min to X-max. Magnification is the X-dimension as a percentage of the specification’s nominal size.
What is a barcode “quiet zone”?
A quiet zone is the clear space a scanner needs around a barcode. Keep it free of text, graphics and all other marks.
What are barcode borders and bearer bars?
A border is a frame around a barcode, and bearer bars run along the top and bottom of a linear symbol. On ITF-14 cartons they even out printing pressure and help prevent misreads and short scans. Here, each is sized by default to accommodate the quiet zone.
What is “bar width reduction”?
Bar width reduction makes bars narrower to compensate for ink spreading as a barcode prints. Printers should do this automatically, but if they don’t, set it here as a fraction of the X-dimension, using the value they recommend. If they do, set it to 0.
What is a “truncated” barcode?
A truncated barcode has bars shorter than the specification’s height, so it can only be scanned in certain directions, and partial scans can cause misreads. “H-dim” and “Height adj.” set the bar height.
What does the K button do in the colour settings?
Commercial printing mixes cyan, magenta, yellow and black (K) inks, and a barcode printed in black ink alone keeps sharp bar edges. K sets that colour to 100% black ink. PDF, EPS and TIFF files carry exactly that ink, ready for commercial print, and JPEG carries it with slight compression changes at the bar edges. SVG files carry it beside a screen colour, but not all software keeps it. PNG and EMF cannot hold inks, so they use the screen colour. In files that hold inks, any other colour in the barcode is converted to inks too, so it may print differently from how it looks on screen.
How do I add spaces and line breaks to barcode text?
Text under a barcode can be replaced with your own, on one line or several. Options can’t contain spaces or line breaks, so each is written as a stand-in character: SP sets the character that becomes a space, and CR the one that starts a new line. Once they are set, pressing Space or Enter in the text box inserts them for you.
This is example data. To download, replace it with your own allocated number. How to get your own barcode numbers.
This barcode can only be used in a supply chain with a number allocated to you. How to get your own barcode numbers.
Click “Finalise Barcode” to download.
Please check your data and options carefully.