
Barcode Basics
Data Matrix vs PDF417 vs QR: Which 2D Barcode Should You Use?
- 2D barcodes
- Data Matrix
- PDF417
- QR code
- barcode comparison
Table of Contents
- The Short Answer
- Data Matrix vs PDF417 vs QR at a Glance
- QR Code: The Phone-Friendly Choice
- Data Matrix: The Small, Tough Choice
- PDF417: The Document Choice
- How They Compare on What Matters
- Which 2D Barcode Should You Use?
- How to Create a 2D Barcode
- Common Mistakes
- Frequently Asked Questions
- Final Thoughts
- Standards and Sources
Choose a 2D barcode by who will scan it, where it will be printed or marked, and whether an industry standard requires a specific symbol. QR is usually the easiest choice for customers with phones. Data Matrix fits small parts and regulated product labels. PDF417 is common on identity documents and other records read by dedicated scanners.
The Short Answer
- QR Code: customer-facing links, menus, payments, product information, and other uses where phone scanning matters.
- Data Matrix: short data on small products, components, instruments, and packages, including direct part marking and some regulated healthcare workflows.
- PDF417: structured records on cards and documents, especially where the receiving system or standard calls for it.
If a regulation, standard, or trading partner names a symbology, use that specification first. For example, the current AAMVA DL/ID Card Design Standard specifies PDF417 as the minimum mandatory machine-readable technology on compliant driver-license and ID documents.
This guide compares the three 2D formats. For a broader choice between linear and 2D symbols, see barcode vs QR code.
Data Matrix vs PDF417 vs QR at a Glance
| Feature | QR Code | Data Matrix | PDF417 |
|---|---|---|---|
| Basic shape | Square matrix | Square or rectangular matrix | Wide rectangle made of stacked rows |
| How to recognize it | Three large finder squares near the corners | Solid L-shaped finder border on two sides | Rows of bars with start and stop patterns |
| Typical strength | Easy phone scanning and consumer familiarity | Compact symbols and durable marking workflows | Structured data on cards and documents |
| Phone camera support | Broad support in built-in camera apps | Varies; a dedicated app may be needed | Varies; a dedicated app or reader is common |
| Error correction | Selectable levels | Built in and set by the symbol format | Selectable levels |
| Common settings | Packaging, signs, menus, and marketing | Small components, healthcare, and industrial marking | Identity cards, tickets, and shipping documents |
Capacity limits depend on the symbol size, encoding mode, and error-correction settings. QR has the highest theoretical capacity of the three, but a code holding a short URL or product identifier is usually sized by readability and the available label area, not the maximum capacity.
QR Code: The Phone-Friendly Choice
A QR Code is a square matrix code. Its three prominent finder patterns help a camera locate and orient it, which supports reliable scanning at different angles. Most current phones can recognize QR codes in their built-in camera app.
QR is a practical fit for customer-facing destinations: a web page, menu, Wi-Fi details, ticket, payment flow, or product information. It also offers selectable error-correction levels. A higher setting can help recover data when part of a symbol is damaged, but it uses more of the symbol for correction and can make the code denser for the same data. A logo overlay is not a substitute for testing.
Keep the encoded data short, preserve the clear margin, and check the destination before printing. Our guides to QR codes for packaging and labels and static vs dynamic QR codes cover those use cases.
Data Matrix: The Small, Tough Choice
A Data Matrix symbol has a solid L-shaped finder border and a dotted border on its other two sides. Its compact matrix can fit short identifiers into a small area, and rectangular versions can suit narrow surfaces. It is used on electronic components, medical devices, instruments, and some pharmaceutical packaging.
ECC 200, the modern Data Matrix version, includes Reed-Solomon error correction. The correction is part of the symbol format rather than a selectable QR-style level. Data Matrix can also be printed or marked directly onto suitable surfaces such as metal or plastic, but the marking process and scanner must be qualified for the material.
GS1 DataMatrix is a specific implementation, not just any Data Matrix containing GS1-looking text. It uses GS1 element-string syntax and Application Identifiers so systems can interpret fields such as a trade item, lot, expiration date, or serial number. Use the format and syntax required by your application; a QR code is not an automatic substitute.
PDF417: The Document Choice
PDF417 is a stacked linear barcode: rows of bars are arranged into a wide rectangular symbol. Despite its name, it is a barcode symbology, not a PDF document format. It can carry a structured record and offers selectable error-correction levels.
PDF417 is associated with North American driver-license and ID documents because the AAMVA standard requires it as the minimum machine-readable technology. It also appears in document workflows where a wide rectangular symbol and a compatible reader are expected. Check the receiving organization's current specification before choosing it.
The trade-off is footprint and scanning convenience. PDF417 generally needs more width than a matrix code carrying comparable short data, and phone camera apps are less likely to decode it automatically than a QR Code.
How They Compare on What Matters
Capacity
QR has the highest published maximum capacity, followed by Data Matrix and PDF417. Those theoretical maxima assume large symbols and particular data modes. Most business labels store a URL, identifier, or short GS1 string, so choose by scanner support, rules, and print area unless you truly need to encode a large record.
Size and shape
For short data on a tiny surface, Data Matrix is often the most compact. QR's finder patterns make it easy to locate with a camera, while PDF417's horizontal shape can use a card back or document strip effectively. Measure the final design with its quiet zone included.
Error correction and damage
All three use error-correction mechanisms, but their controls differ. QR and PDF417 offer selectable levels; Data Matrix correction is built into the symbol version. Do not rely on a general percentage for how much damage a printed code can survive. Substrate, print quality, damage location, and reader all matter, so test the actual production sample.
Scanner compatibility
Phone cameras are the clearest advantage for QR. Data Matrix and PDF417 are commonly read with camera-based 2D imagers or scanner apps that list those formats. Older laser scanners are generally built for 1D symbols; check the scanner model before changing a workflow.
Quiet zones
Do not copy one format's margin rule to another. GS1's retail guidance specifies a clear margin of at least one X-dimension for Data Matrix and four X-dimensions for QR Code. Other applications can have different requirements. Follow the standard for your use case and leave extra room when the layout allows it.
Which 2D Barcode Should You Use?
| Your situation | Starting point | What to confirm |
|---|---|---|
| Customers scan a link with their phones | QR Code | Destination, contrast, and final-size scan test |
| Small part or instrument carries a short identifier | Data Matrix | Marking method, surface, and reader support |
| Medicine or device packaging has GS1 data | GS1 DataMatrix when required | Applicable GS1 and regulatory specifications |
| North American driver-license or ID document | PDF417 | Current AAMVA and jurisdiction rules |
| Document or carrier workflow expects a wide symbol | PDF417 or specified format | Receiver's current guide and scanning hardware |
| Internal asset tag read by staff phones | QR Code | Whether phone access is allowed and the code is large enough |
If the data is only a short SKU, bin number, or tracking ID, a linear code such as Code 128 may be simpler and compatible with more existing equipment. See our Code 128 guide.
How to Create a 2D Barcode
- Check the application, regulation, retailer, or carrier specification for the required symbology and data syntax.
- Keep the encoded data no longer than necessary. A shorter payload usually produces a less dense symbol.
- Choose software that explicitly supports the required symbology. New Age Apps currently provides a QR Code Generator and common 1D barcode formats; it does not list Data Matrix or PDF417 among the current barcode options.
- Use the required GS1 mode when applicable. A plain symbol with the right-looking data is not necessarily a compliant GS1 symbol.
- Keep dark modules on a light background and preserve the symbology's quiet zone.
- Test the final-size print or mark with the actual scanners used by customers, staff, or trading partners.
Common Mistakes
- Choosing QR for a regulated workflow whose specification requires another symbology.
- Assuming a phone camera will read every 2D barcode.
- Using a plain Data Matrix where a GS1 DataMatrix encoding is required.
- Encoding unnecessary data and making the modules too small to print reliably.
- Removing quiet zones or placing graphics too close to the code.
- Assuming a 1D laser scanner can read QR or Data Matrix.
- Approving a code from an on-screen preview without testing its real print, surface, and scanner.
Frequently Asked Questions
What is the difference between Data Matrix and QR code?
Both are matrix-style 2D codes. QR has three large finder squares, broad phone-camera support, and selectable error-correction levels. Data Matrix has an L-shaped finder border, can be made very small or rectangular, and is common in industrial and healthcare workflows. The right choice depends on the data, surface, scanner, and rules for your application.
Is PDF417 a 2D barcode?
Yes. PDF417 is a stacked linear symbology: rows of linear-style bars are stacked to form a rectangle. It stores data in two dimensions and has defined error-correction levels.
Can an iPhone or Android camera scan Data Matrix or PDF417?
Do not assume the built-in camera will decode them. Phone cameras reliably recognize QR codes, while Data Matrix and PDF417 support varies by phone and app. Use a scanner that explicitly lists the symbology you need and test it on the intended device.
Which 2D barcode holds the most data?
QR Code has the highest published maximum capacity among these three, followed by Data Matrix and PDF417. Maximums assume large symbols and particular data modes; most real labels encode much less, so scanner compatibility and print area are usually more useful selection criteria.
Which 2D barcode is the smallest?
Data Matrix is often the most compact option for short data. The final printable size still depends on the encoded data, printer or marking method, substrate, and scanner.
Why do North American driver's licenses use PDF417?
The AAMVA DL/ID Card Design Standard identifies PDF417 as the minimum mandatory machine-readable technology for compliant North American driver-license and identification documents. Follow the current standard for the issuing jurisdiction.
Can a GS1 DataMatrix be replaced with an ordinary QR code?
Not automatically. GS1 DataMatrix uses GS1 element-string syntax for supply-chain data. A GS1 QR Code or QR Code using GS1 Digital Link has different encoding rules and must be accepted by the application and trading partners. Follow the applicable GS1 and industry specification.
Final Thoughts
Choose the 2D symbol that matches the scanner, surface, and standard for the job. QR is the straightforward choice for a public link, Data Matrix is often the compact choice for short industrial or healthcare data, and PDF417 is common where identity-document standards require it. Confirm the specification and test on the real equipment before production.
For customer-facing QR codes, start with the QR Code Generator. For small IDs that only need a 1D symbol, the Barcode Generator also supports Code 128.
Official Help and References
For symbology requirements, see the published standards for QR Code (ISO/IEC 18004), Data Matrix (ISO/IEC 16022), and PDF417 (ISO/IEC 15438). For GS1 carrier and syntax choices, consult the GS1 overview of DataMatrix and QR options and the GS1 retail 2D barcode guideline.
Enjoyed this post?
Share it with your network