Two-dimensional barcodes are an essential part of global supply chains, retail shelves, and healthcare systems. Within the GS1 ecosystem, an international framework that standardizes the product and location data encoded in these barcodes, two symbologies in particular stand out as highly capable carriers of machine-readable information: GS1 DataMatrix and GS1 QR Code.
Both barcode types are capable of encoding GS1 Application Identifiers (AIs) and both support the GS1 Digital Link URI structure. The question of which to implement is therefore not one of GS1 compliance, but of engineering fit.
This article provides an overview of each symbology and examines how they differ in terms of data capacity, minimum print size, scanner ecosystem compatibility, and error correction.
GS1 encoding fundamentals
Before comparing the two symbologies, it’s worth establishing what makes a QR Code or Data Matrix Code GS1-compliant in the first place. After all, the compliance layer isn’t part of the barcode type, but of the encoded data.
Application Identifiers
GS1 data is structured using Application Identifiers: two- to four-digit numeric prefixes that define the meaning and format of the data element that follows.
The Application Identifier (01) marks a Global Trade Item Number (GTIN), (17) an expiration date, (10) a lot number, and so on. A single barcode can carry multiple AIs in sequence, so a GTIN, batch number, and expiration date can be extracted simultaneously. The full set of AIs and their associated data is defined in the GS1 General Specifications.
The FNC1 character
What distinguishes a GS1 barcode from a generic one carrying similar data is the presence of the Function Code 1 (FNC1) character. In both QR Code and Data Matrix, a FNC1 in the first position of the encoded data signals to the decoder that it conforms to the GS1 format. This triggers AI parsing and allows the barcode scanner to interpret the data correctly, provided it supports the GS1 standard. Without a FNC1 in the first position, the barcode may scan, but it will not be recognized as GS1-compliant.
GS1 Digital Link
Both Data Matrix and QR Code can encode a GS1 Digital Link URI, a web-resolvable URL that embeds GS1 identifiers in a standardized path structure. A typical GS1 Digital Link URI looks like this:
https://example.com/01/09506000134352/10/ABC123/17/251231
In this example, /01/ introduces the GTIN, /10/ the lot number, and /17/ the expiration date. This structure allows the same barcode to serve both industry-grade scanning systems that parse AIs directly and consumer smartphones, which just follow the URL to a product information page.
QR Code and Data Matrix compared
With both symbologies capable of encoding GS1-standardized data, the decision between the two comes down to a few details. Let’s have a closer look at what differentiates QR Codes from Data Matrix Codes.
QR Code
QR Code’s data capacity reaches approximately 3 KB of binary data at the largest version, but in most cases, the encoded data is much smaller than this. For example, a GTIN, expiration date, and lot number typically take up well under 100 bytes.
A QR Code offers four error correction levels: L (7%), M (15%), Q (25%), and H (30%), with a higher level corresponding to a larger barcode size. Level M is a common default for retail and industrial print environments.
The symbology requires a quiet zone of four modules on all sides, as well as three corner finder patterns. This constrains how small a GS1 QR Code can be printed while remaining scannable, which makes it less suited for very small label areas.
Another important aspect of QR Codes is that they’re scannable by the default camera app on virtually all modern smartphones (iOS 11+ and Android since ~2020), while Data Matrix Codes typically require a third-party scanner app.
Data Matrix
The maximum data capacity of a Data Matrix Code is approximately 1.5 KB. This is much lower than QR Code, still more than enough for encoding GS1 data. The main advantage of Data Matrix is that it can be printed or laser-engraved at sizes below 2 mm², making it well-suited for direct part marking and pharmaceutical unit-of-use packaging.
The symbology’s Reed-Solomon error correction can recover between 25–30% of damaged data. Unlike QR Code, there aren’t multiple error correction levels. Instead, it scales automatically with size.
Data Matrix requires a quiet zone of only one module on all sides, and GS1 specifications permit a smaller minimum size than QR Code in certain contexts. This combination is the primary reason a Data Matrix Code achieves a significantly smaller physical footprint than a QR Code with the same encoded data.
💡 GS1 DataMatrix is the mandatory carrier for pharmaceutical serialization under both the US DSCSA and the EU Falsified Medicines Directive (FMD). Required AIs include the GTIN (01), serial number (21), batch/lot number (10), and expiration date (17).
Comparison table
To summarize, both symbologies are excellent choices for encoding GS1-standardized data, with the main consideration being how much space is available for the barcode. Data Matrix offers a higher error correction rate at smaller dimensions, while QR Codes come with the capacity to store even large amounts of data. QR Codes are also more widely supported by consumer-grade barcode scanners.
| Aspect | QR Code | Data Matrix |
|---|---|---|
| ISO standard | ISO/IEC 18004 | ISO/IEC 16022 |
| Maximum data capacity | ~3 KB | ~1.5 KB |
| Error correction | L / M / Q / H (7–30%) | Reed-Solomon (~25–30%) |
| Minimum physical footprint | Comparatively large | Very small |
| Quiet zone | 4 modules on all sides | 1 module on all sides |
| GS1 Digital Link support | Yes | Yes |
| Consumer-grade scanner support | Broad | Limited |
Answering the following questions can also help settle on one of the two symbologies:
- Will consumers scan the barcodes with their smartphones? → GS1 QR Code
- Is the label area very small (e.g., in direct part marking or on blister packs)? → GS1 DataMatrix
- Will the barcodes be used on retail consumer products implementing Sunrise 2027? → GS1 QR Code
- Will the barcode labels be subject to wear and tear? → GS1 DataMatrix
Technical implementation
Generating a scannable barcode and generating a GS1-compliant barcode are not the same thing. Conformance requires correct FNC1 placement, valid AI structure, and adherence to the data format rules defined in the GS1 General Specifications for each AI. Therefore, if you generate your own GS1 QR Codes or GS1 DataMatrix Codes, you should validate the encoded data against a GS1-certified verifier.
Decoding a GS1 barcode correctly involves two distinct steps that are often mistaken as one: reading the encoded data and parsing its content. A barcode scanning library can successfully decode the raw bytes from a Data Matrix or QR Code, but still fail to interpret the GS1 structure within it, resulting in a confusing string of characters instead of a structured set of AI-keyed values. Therefore, you need to ensure that your decoding layer is not only capable of reading 2D barcodes, but also GS1-aware.
A good way to test this is to scan a barcode in which a variable-length AI is the final element, e.g.:

(01)09506000134352(10)ABC123
Since ABC123 (a lot number, as signified by (10)) comes at the end, no FNC1 separator (<FNC1>) is required. A high-quality barcode scanner will decode the data without issues, whereas a hand-coded parser might reject it as invalid.
💡 To see what this looks like in code, check out our tutorial on how to implement a barcode scanner with GS1 parsing in JavaScript.
Conclusion
GS1 DataMatrix and GS1 QR Code are not competing standards, but complementary tools for different use cases. Data Matrix earned its place in healthcare, electronics manufacturing, and direct part marking through its compactness and robustness. Meanwhile, QR Code’s main advantages are its readability with consumer devices and its higher data capacity. Both symbologies support GS1 Digital Links, which gives them the ability to make a physical label resolvable as a web resource.
Therefore, the choice between the two comes down to your use case’s real-world circumstances: How much space is available for the barcode labels? Will they be used in a retail context or in an industrial setting? And who’s going to scan them?
The Scanbot Barcode Scanner SDK supports all common GS1 barcode symbologies, including QR Code, Data Matrix, UPC, EAN, and DataBar. It targets Android, iOS, Web, Linux, and Windows, with dedicated SDKs for cross-platform frameworks like React Native, Flutter, and .NET MAUI.
To learn more, head over to the documentation or try the demo app on your device.
FAQ
Is GS1 the same as EAN?
No. GS1 is a global non-profit organization that develops and manages standards for supply chain identification, but the term “GS1” is sometimes used to denote the standards the organization has developed, e.g., the Global Trade Item Number (GTIN). EAN (European Article Number) refers specifically to the 13-digit GTIN-13 barcode format, originally created for European retail but now used worldwide under GS1 standards.
What is the difference between GTIN and GS1?
GS1 is the global non-profit organization that develops and manages international standards for supply chain identification, while a GTIN (Global Trade Item Number) is a specific unique numeric identifier (typically 8-14 digits, such as UPC or EAN) issued within the GS1 system to distinguish individual trade items. So GS1 is the standards body and issuer, whereas GTIN is one of its core products for product identification.
How do I get my GS1 barcode?
To obtain a GS1 barcode, you must become a member of your local GS1 organization, as GS1 is the sole official issuer to ensure authenticity and avoid fakes from unofficial sellers. The process typically involves signing up online via their website, selecting a GS1 Company Prefix or individual GTINs based on your product needs, providing your business details, and accessing their member portal to generate and manage your barcodes with accompanying product data. Make sure to avoid third-party resellers.
What is Sunrise 2027?
Sunrise 2027 is a global initiative led by GS1, the international organization responsible for establishing standards for barcodes and supply chain data. It aims to transition retail point-of-sale (POS) systems from traditional one-dimensional (1D) barcodes, like EAN and UPC, to two-dimensional (2D) barcodes, such as QR Code and Data Matrix, by the end of 2027.
Does the EU Digital Product Passport require GS1 barcodes?
No. The DPP mandates a unique product identifier (UPID) and a scannable data carrier (such as QR codes, 2D barcodes, or RFID/NFC) to connect physical products to digital sustainability data. It prioritizes interoperability without prescribing specific standards like GS1. Still, GS1 barcodes are an excellent fit duer their global uniqueness and supply chain alignment.