1D vs 2D Barcodes: What's the Difference and Does It Matter?

The Short Answer: It Matters in Four Situations

A 1D barcode stores data in the widths of bars and spaces that a scanner reads along a single line. A 2D code stores data in a pattern spread across both height and width. In practice, a 1D barcode usually carries a short identifier that software looks up in a database, while a 2D code can carry that identifier and the data around it, such as a lot number, an expiry date or a serial number, inside the symbol itself (Source: Packaging World, GS1 Connect coverage, retrieved 2026).

Whether that difference matters to you depends on four things: how much data the label must carry, how much space and damage tolerance the label needs, whether every scanner in the path can read the symbol, and whether a customer or regulator specifies 2D. If none of the four applies, a well-printed 1D code still does the job. The retail system built on EAN and UPC linear codes has worked for more than 50 years (Source: Videojet, retrieved 2026).

This article takes those four questions in turn, then covers where standards are pushing 2D, when 1D remains the better choice and what to ask before switching. We found no independent study that compares read rates of 1D and 2D codes in warehouse or retail operations. The comparisons here rest on symbology specifications as published by their administrators and vendors, GS1 documents, and scanner and label suppliers, and the text says so where a claim comes from a supplier. For a wider comparison that includes RFID and NFC, see our guide to barcode, QR Code, RFID and NFC.

USD 8.4–8.9 B Global 2D barcode reader market in 2025: Fortune Business Insights USD 8.44 billion, Straits Research USD 8.90 billion. Global Market Insights puts 2024 at USD 8.5 billion. Growth forecasts run from 7.1% to 9.4% a year (Fortune 7.10% for 2026–2034, Grand View Research 9.4% for 2025–2030) because scope and periods differ, so do not compare these figures with estimates for all barcode scanners. (Sources: as named, 2025–2026)
7,089 digits Maximum numeric capacity of the largest QR Code (version 40, level L). A Data Matrix holds up to 3,116 digits, and a UPC-A symbol holds 12. (Sources: Scandit, adapted from Denso Wave; Keyence; Science ABC, retrieved 2026)
7–30% Share of a QR Code's codewords that error correction can restore, from level L (7%) to level H (30%). Higher levels need more space. (Source: Scandit, adapted from Denso Wave, retrieved 2026)
End of 2027 GS1's target for retail point-of-sale systems to read and process GS1 2D barcodes alongside existing linear barcodes. It is an industry readiness milestone, not a legal requirement, and linear barcodes are not being retired. (Sources: GS1 guideline, 2025; Packaging World, retrieved 2026)
Diagram comparing a 1D linear barcode read by a single scan line with a 2D matrix code captured as a whole image
How a 1D linear code and a 2D matrix code are read
Attribute1D linear barcode2D barcode (matrix or stacked)
How data is storedWidths of bars and spaces along one lineA pattern across height and width (square modules, or stacked rows)
Typical contentA short identifier looked up in a databaseAn identifier plus lot, expiry, serial number or a web address
Capacity exampleUPC-A: 12 digitsQR Code up to 7,089 digits; Data Matrix up to 3,116 digits
Damage handlingCheck character detects misreads; data repeat at every bar heightReed-Solomon error correction restores part of a damaged symbol
Scanner neededLaser, linear imager or area imagerArea imager for matrix codes; some raster readers handle stacked codes
Phone screensImagers read them; lasers do not reliablyRead by imagers and phone cameras
Label spaceWide; grows with data lengthCompact; grows slowly with data length
Print demandsModerate; grade to ISO/IEC 15416Higher precision at small module sizes; grade to ISO/IEC 15415

How 1D and 2D Barcodes Store Data

Linear codes: one line carries everything

A linear symbology such as Code 128, Code 39 or UPC/EAN encodes data in a row of bars and spaces. Code 128 is a typical example: each symbol character is 11 modules wide, the stop character is 13, and a check character is added before the stop (Source: GS1 General Specifications change notice GSCN 20-044, retrieved 2026). A module is the narrowest bar or space, and its width, called the X-dimension, sets how large the symbol prints. Code 128 can encode the full ASCII character set, while UPC-A encodes 12 digits (Source: Endless Commerce symbology guide; Science ABC, retrieved 2026).

Because all the data lie in one direction, a scanner needs a scan line that crosses every bar. Laser scanners, linear imagers and area imagers can all provide that line, which is why a supplier describes 1D codes as readable by virtually any scan engine (Source: BIAS Technology, retrieved 2026). Our guide to how barcode scanning works explains the path from light source to data output.

Matrix and stacked codes: data in two directions

A 2D symbology uses height as well as width. Matrix codes such as QR Code and Data Matrix arrange square modules in a grid. Stacked codes such as PDF417 pile short linear rows on top of each other, and each row is a small linear barcode with its own start and stop pattern (Source: Endless Commerce symbology guide, retrieved 2026). QR Code comes in versions 1 to 40, from 21 by 21 modules to 177 by 177 (Source: Scandit, adapted from Denso Wave, retrieved 2026). Data Matrix ECC 200, the version in current use, ranges from 10 by 10 to 144 by 144 modules (Source: Keyence; TEC-IT, retrieved 2026).

Two names cause confusion in retail and healthcare. GS1 DataMatrix is a Data Matrix symbol that carries data in GS1 element string syntax, while a QR Code or Data Matrix with GS1 Digital Link carries the product identifier written as a web address (Source: GS1 solution provider 2D readiness criteria, 2025). The difference lies in the data structure, not in the shape of the symbol.

Capacity and Label Space: Where 2D Wins

The capacity gap is large. A QR Code at version 40 holds up to 7,089 digits or 4,296 alphanumeric characters, and a Data Matrix holds up to 3,116 digits or 2,335 alphanumeric characters, against 12 digits in a UPC-A symbol (Source: Scandit; Keyence; Science ABC, retrieved 2026). Those maximums are theoretical. One software vendor advises keeping a Data Matrix to 800 characters or fewer in practice (Source: Aspose documentation, retrieved 2026), and most labels carry far less.

Capacity matters less than what it buys. Compact 2D symbols fit on small labels, curved surfaces and small parts, and they let a scan capture a lot number and expiry date without a database lookup. A 1D code plus a database record gives the same information when every scan point can reach the database, so the question is where the data should live.

A worked example: 20 digits on one label

As an illustration, suppose a label must carry a 20-digit number and the printer produces modules 0.33 mm wide. Code 128 packs two digits into each symbol character in code set C, so 20 digits need 10 data characters, plus a start character and a check character at 11 modules each and a 13-module stop character (Source: GS1 General Specifications change notice GSCN 20-044, retrieved 2026). That is 145 modules, or about 48 mm wide before the quiet zones. The same 20 digits fit in a 16 by 16 Data Matrix, which holds up to 24 digits (Source: OnBarcode Data Matrix FAQ, retrieved 2026), and at the same module width that symbol is about 5.3 mm square. The 20-digit number and the 0.33 mm module are assumptions for the example, not measured values, and quiet zones add to both symbols.

The saving is about a factor of nine in width, but it comes with a condition. A symbol this small depends on printer precision and imager resolution, which the equipment section below covers.

Damage Tolerance: Check Characters Versus Error Correction

How 1D codes cope with damage

Most 1D symbologies add a check character that lets the scanner detect a misread, but not repair it (Source: Cambridge University Press, Barcodes for Mobile Devices, retrieved 2026). The Code 128 check character, for example, is a weighted sum modulo 103 (Source: Endless Commerce symbology guide, retrieved 2026). 1D codes do have one natural protection: the same data repeat at every height of the bars, which the same book calls vertical redundancy. A scanner can often read a partly damaged symbol along another scan line that stays clean.

How 2D codes cope with damage

2D symbols have no vertical redundancy, so they carry error correction instead. Most use Reed-Solomon codes, which add extra codewords so that a reader can rebuild missing or misread ones (Source: Cambridge University Press, retrieved 2026). QR Code offers four levels that can restore about 7% (L), 15% (M), 25% (Q) or 30% (H) of the symbol's codewords, and higher levels need more space (Source: Scandit, adapted from Denso Wave, retrieved 2026). Data Matrix ECC 200 sets its correction by symbol size, at roughly 23% to 39% in the sizes shown in Keyence's table (Source: Keyence, retrieved 2026).

Error correction has limits. It repairs damage up to the level chosen, and past that point the symbol does not read at all. A software vendor also notes that greater data density means more opportunities for damage (Source: inFlow Inventory, retrieved 2026). Print quality is graded under ISO/IEC 15416 for linear symbols and ISO/IEC 15415 for 2D symbols, and a verifier conforming to ISO/IEC 15426-1 or 15426-2 measures it (Source: GS1 GSCN 24-011; GS1 support, 2024). Grade labels after the abrasion, moisture and handling they will actually see, not only when they leave the printer.

What Your Scanners, Printers and Screens Must Support

Scanners

The compatibility rule is simple in one direction. Laser scan engines and linear imagers read only 1D codes, while a 2D area imager reads both 1D and 2D (Source: Wasp Barcode Technologies, retrieved 2026). The reason is geometry: a laser sweeps a thin line, and no sweep pattern covers a whole matrix symbol, so reading QR Code or Data Matrix needs an imager (Source: Datacor, retrieved 2026). These are supplier descriptions, but they match how the engines work. Our guide to laser, LED and imager light sources covers the technology in more detail.

Stacked codes are the exception. A supplier notes that PDF417, the stacked code on North American driver's licences, could be read by the laser scanners already deployed when that standard was set (Source: Endless Commerce, retrieved 2026). Do not assume a laser scanner reads every 2D symbology, however. Test the exact symbology on the exact scanner model.

Screens are a second reason to use imagers. A supplier notes that lasers do not reliably read codes displayed on phones or tablets, because a screen does not reflect laser light properly, while imagers do (Source: Datacor, retrieved 2026). Replacing a 1D scanner with a 2D imager does not strand existing labels, because the imager reads both (Source: Wasp Barcode Technologies, retrieved 2026). Suppliers say imagers cost more than lasers, but we found no current independent price comparison, so ask for quotes on the models you would actually buy.

Printers, labels and direct part marking

A label supplier notes that smaller module sizes allow compact symbols but require precise printing and higher-resolution scanners (Source: JLCMC, retrieved 2026). Test the printer, the label material and the imager together, not one at a time.

Data Matrix is also widely used for direct part marking, where the symbol is laser-etched, dot-peened or chemically etched straight onto a part (Source: Scandit, retrieved 2026). One marking supplier describes Data Matrix ECC 200 as the standard in the automotive and aerospace industries (Source: Videojet white paper, retrieved 2026). These marks are typically graded under ISO/IEC TR 29158, known as AIM DPM, instead of the label print-quality standards (Source: GS1 UK, 2015). The 2015 date is old, but the standard is the one still named by marking suppliers today.

Where Standards and Regulators Are Pushing 2D

Retail: GS1 Sunrise 2027

GS1's goal, called Sunrise 2027 in the United States and Ambition 2027 globally, is that by the end of 2027 retail point-of-sale systems can read and process a defined set of GS1 2D barcodes alongside existing linear ones (Source: GS1 US; Packaging World, retrieved 2026). GS1's implementation guideline (Release 1.1.0, ratified December 2025) describes a dual-marking transition in which a product carries its EAN or UPC barcode plus a GS1 DataMatrix, a QR Code with GS1 Digital Link, or a Data Matrix with GS1 Digital Link (Source: GS1, 2D Barcodes at Retail Point-of-Sale Implementation Guideline, 2025).

Three clarifications matter. Sunrise 2027 is a retailer-led readiness milestone, not a legal requirement (Source: Keyence, retrieved 2026), and GS1 US says linear barcodes are not being retired (Source: Packaging World, retrieved 2026). Timelines also vary by region: GS1 Belgium and Luxembourg describes linear-only or linear plus 2D until the end of 2027, and linear-only or 2D-only from 2028 (Source: GS1 Belgium & Luxembourg, 2024). Placement rules apply too: GS1's verification template asks whether the 2D code sits within a 50 mm radius of the centre of the linear point-of-sale barcode (Source: GS1 GSCN 24-011, retrieved 2026). Check your own retailers' supplier requirements.

Healthcare and other regulated products

In the United States, FDA material on the Drug Supply Chain Security Act states that the product identifier, made up of the National Drug Code, serial number, lot number and expiration date, goes in a 2D Data Matrix barcode on a prescription drug package. A homogeneous case may use a linear or a 2D Data Matrix barcode (Source: FDA, DSCSA implementation presentation, retrieved 2026). This is general information, not legal advice. North American driver's licences carry a PDF417 symbol under the AAMVA standard (Source: Scanbot SDK, retrieved 2026).

These examples share a pattern: a regulator or trading partner names the symbology and the data, and the equipment follows. For a warehouse that only scans its own location labels, none of them may apply.

When a 1D Barcode Is Still the Right Choice

A 1D code is usually enough when the label carries only an identifier, label space is not tight, and the data live in a system that every scan point can reach. In that case moving to 2D adds a project without removing a problem. The case for 2D grows when data must be readable at the point of scan, surfaces are small, curved or abrasive, a partner or regulator specifies 2D, or phone screens must be scanned.

SituationBetter fitWhy
Location, tote or carton ID looked up in a WMS, with all scanners 1D1D linear codeThe identifier is all the scan needs, and existing scanners keep working
Lot, expiry or serial number must travel with the item2D code, for example GS1 DataMatrixThe symbol carries the data, so no lookup is needed at the scan point
Small parts or curved surfaces2D Data MatrixCompact symbols, and marking methods such as laser etching and dot peening
A customer or regulator names 2D (retail Sunrise 2027, US drug packages)The 2D code they specifyCompliance follows the named symbology and data syntax
Codes shown on phone screens, such as tickets or coupons2D or 1D read by imager scannersLasers do not reliably read screens; imagers do
Mixed estate of older laser scanners and newer imagersDual marking, as GS1 does in retailThe linear code keeps old scanners working while the 2D code is phased in

The last row reflects how GS1 handles retail: it keeps the linear code and adds a 2D code during the transition rather than switching at once. The same approach suits any mixed estate of older and newer scanners.

Questions to Ask Before You Switch to 2D

So, Does It Matter?

It matters when the label has to carry more than an identifier, survive handling in a small space, or meet a trading partner's rule. In those cases 2D offers more capacity, built-in error correction and a smaller footprint, in return for imager-based scanners, tighter print control and a data structure your systems can parse. It matters much less when a short identifier looked up in a database does the job and the scanners are already in place.

The practical test is a pilot, as with any device: print the real labels, scan them with the real scanners at the real speed, and compare first-read rates on aged labels. Because we found no independent read-rate studies, your own measurements are the best evidence available. For a broader selection framework, see our buyer's checklist for barcode scanners.

Frequently Asked Questions

Can a 1D barcode scanner read a QR Code?

Generally no. Laser scan engines and linear imagers read only 1D symbols, because a thin scan line cannot cover a matrix symbol such as QR Code or Data Matrix. A 2D area imager reads both 1D and 2D codes. Some raster scanners can read stacked codes such as PDF417, so test your exact scanner and symbology.

Is a 2D barcode more reliable than a 1D barcode?

Not automatically. 2D symbols include Reed-Solomon error correction, and QR Code can restore about 7% to 30% of its codewords depending on level. 1D codes rely on a check character and on repeating data at every bar height. Reliability still depends on print quality, so grade labels to ISO/IEC 15415 or 15416.

Will 2D barcodes replace UPC barcodes?

Not on a fixed date. GS1's Sunrise 2027 goal is for retail checkouts to read GS1 2D barcodes alongside UPC and EAN by the end of 2027, and GS1 US says linear barcodes are not being retired. During the transition, products carry both. Confirm timelines with your retailers and region.

What is the difference between QR Code and Data Matrix?

Both are square 2D matrix symbols. QR Code holds more, up to 7,089 digits against 3,116, and offers four error correction levels. Data Matrix starts smaller, at 10 by 10 modules against 21 by 21, and is widely used for direct part marking. GS1 approves GS1 DataMatrix and QR Code with GS1 Digital Link for retail.

Scanning in a demanding environment?

Share your operating conditions, and we'll give you an honest view of what fits.

Explore ALVICS Products →

Related Reading