The basics: 1D lines vs 2D grids
Barcodes and QR codes solve the same problem: encoding data in a machine-readable format. But they do it differently, and those differences matter when you're picking one for your product, packaging, or marketing campaign.
A traditional barcode is one-dimensional (1D). It stores data in parallel lines of varying width. A scanner reads it by measuring the widths of black bars and white spaces in a single horizontal pass. Think of the stripes on the back of a cereal box. The data runs in only one direction, left to right.
A QR code is two-dimensional (2D). It uses a square grid of black and white modules arranged in rows and columns. Data is encoded both horizontally and vertically, which is why a QR code can hold dramatically more information in the same physical space. The three large squares in the corners (called finder patterns) let a scanner lock onto the code from any angle.
That's the core distinction. Everything else (capacity, error correction, scanning flexibility) flows from this structural difference.
Detailed comparison
The table below puts the key differences side by side. Some numbers are approximate because barcode capacity depends on the specific symbology, version, and data type.
| Feature | 1D Barcode | QR Code |
|---|---|---|
| Dimensions | 1D (linear) | 2D (matrix) |
| Data capacity | UPC-A: 12 digits. EAN-13: 13 digits. Code 128: ~100 characters. | Up to 7,089 numeric or 4,296 alphanumeric characters. |
| Data types | Numeric only (UPC/EAN). Alphanumeric (Code 128, Code 39). | Numeric, alphanumeric, binary, and Kanji. |
| Error correction | Simple checksum digit. No redundancy. | Reed-Solomon error correction at 4 levels (7%, 15%, 25%, 30%). |
| Damage tolerance | Low. A scratch across the bars often kills the scan. | High. Up to 30% of the code can be damaged (Level H) and still scan. |
| Scanning angle | Must align roughly horizontally with the scanner. | 360-degree scanning from any orientation. |
| Scanner required | Laser or CCD barcode scanner. | Any smartphone camera, or a dedicated 2D imager. |
| Physical size | Gets wider as data increases. Height is decorative. | Stays square. Grows in both dimensions as data increases. |
| Year introduced | UPC: 1974. EAN: 1977. Code 128: 1981. | 1994, by Denso Wave (Japan). |
| First real scan | June 26, 1974: a pack of Wrigley's Juicy Fruit gum in Troy, Ohio. | 1994: Toyota auto parts tracking in Japanese factories. |
Common 1D barcode types
Not all barcodes are the same. Different industries settled on different symbologies over the decades, each optimized for a particular set of constraints.
UPC-A (Universal Product Code)
12 digits. The standard on retail products in the United States and Canada since 1974 (read more). Every item you scan at a grocery store checkout uses UPC-A. The first digit identifies the product category, the next five identify the manufacturer, the following five identify the specific product, and the last digit is a checksum.
EAN-13 (European Article Number)
13 digits. The international equivalent of UPC-A, adopted in 1977. Used on retail products worldwide outside North America. A UPC-A code is actually a subset of EAN-13 with a leading zero. If you sell products globally, you'll deal with EAN-13.
Code 128
Variable length, high density. Encodes all 128 ASCII characters in a compact format. The go-to choice for shipping labels and logistics. GS1-128 (formerly UCC/EAN-128) is a standardized application of Code 128 used for supply chain data: batch numbers, expiration dates, serial numbers, and container codes.
Code 39
Alphanumeric (A-Z, 0-9, plus a few special characters). Self-checking, meaning it doesn't strictly need a checksum. Widely adopted by the U.S. Department of Defense (MIL-STD-1189) and the automotive industry. It's less compact than Code 128, but simpler to implement and still common in government and military applications.
ITF (Interleaved Two of Five)
Numeric only, always an even number of digits. Primarily used on outer cartons and cases in warehousing. ITF-14 (a 14-digit variant) identifies trade items at the packaging level. You'll see it on the brown cardboard boxes that hold individual retail products.
Other 2D code types
QR codes get the most attention, but they're not the only 2D symbology. Three others show up regularly in specific industries.
Data Matrix
A square or rectangular 2D code popular in industrial and electronics manufacturing. Maximum capacity: about 2,335 alphanumeric characters. Data Matrix codes can be printed extremely small (a few millimeters across), which makes them ideal for marking individual electronic components, surgical instruments, and pharmaceutical vials. The United States Postal Service uses Data Matrix for its Intelligent Mail barcode on letters and packages.
PDF417
A stacked linear symbology. It looks like a tall barcode, but it's technically 2D because data is encoded across multiple rows. Maximum capacity: about 1,850 characters. You'll find PDF417 on U.S. driver's licenses, state-issued ID cards, and legacy airline boarding passes. It's also common on shipping labels where more data is needed than Code 128 can hold.
Aztec Code
A square 2D code with a distinctive bullseye pattern in the center. Adopted by IATA for mobile boarding passes and used on European rail tickets (Deutsche Bahn, SNCF, Swiss Federal Railways, and others). The key advantage: Aztec codes don't require a quiet zone (the blank margin around the code), so they can be printed in tighter spaces. Maximum capacity: about 3,832 alphanumeric characters.
When to use which
The right choice depends on what you're encoding, where it'll be scanned, and who's scanning it. Here's a practical breakdown.
1D Barcode
- Retail point-of-sale (UPC/EAN)
- Short numeric product IDs
- Legacy inventory systems
- Warehouse carton labels (ITF)
- Shipping and logistics (Code 128)
QR Code
- Marketing URLs and landing pages
- Mobile payments (Alipay, WeChat Pay)
- Rich data: vCards, Wi-Fi credentials, calendar events
- Consumer-facing printed materials
- Situations requiring damage tolerance
Data Matrix
- Tiny surfaces (electronics, medical devices)
- FDA Unique Device Identification (UDI)
- Pharmaceutical packaging
- Direct part marking on metal or glass
PDF417
- Government-issued IDs
- U.S. driver's licenses
- Legacy airline boarding passes
- Documents requiring embedded text
If you're creating links for posters, business cards, menus, or event flyers, a QR code is almost always the right choice. Consumers already know how to scan them, no special app is needed, and the error correction means they'll work even if the print quality isn't perfect.
If you're labeling products for retail sale, you need a UPC-A or EAN-13 barcode. There's no getting around it. Retailers won't accept products without a GS1-assigned barcode, and their point-of-sale systems expect a 1D scan.
For industrial marking on tiny components, Data Matrix wins. For government IDs with structured personal data, PDF417 is the established standard. For airline mobile boarding passes, Aztec code is the IATA requirement.
GS1 Digital Link and Sunrise 2027
What is Sunrise 2027?
GS1 (the organization that manages UPC, EAN, and other product identification standards) is leading a transition called Sunrise 2027. The goal: retailers worldwide should be ready to accept 2D codes (including QR codes) at checkout by the end of 2027.
This doesn't mean 1D barcodes disappear overnight. It means point-of-sale scanners and systems should be able to read both formats, giving brands the option to replace the traditional barcode with a QR code.
The technology behind this transition is called GS1 Digital Link. It encodes a product's GTIN (Global Trade Item Number, the identifier inside a UPC or EAN) as a web URI. For example:
https://id.gs1.org/01/09506000134352
That URL contains the GTIN 09506000134352 and resolves to product information on the web. A point-of-sale scanner reads the embedded GTIN and looks up the price, just like scanning a traditional barcode. But a consumer scanning the same QR code with their phone gets redirected to a product page, nutritional info, recall notices, or promotional content.
One code, two audiences. That's the core value of GS1 Digital Link.
What changes for brands?
Brands that adopt GS1 Digital Link can print a single QR code on packaging that replaces both the UPC barcode and any marketing QR code. Less clutter on the label. More space for design. And the QR code becomes a direct channel to the consumer, not just a price lookup tool.
What changes for retailers?
Retailers need to upgrade their point-of-sale hardware and software to read 2D codes and extract the GTIN from a GS1 Digital Link URI. Major retailers including Walmart, Kroger, and several European chains are already piloting 2D scanning at checkout. The 2027 deadline is a readiness target, not a mandate. Brands that want to switch early need their retail partners to be capable of scanning the new format.
Timeline reality check
The UPC barcode has been on products for over 50 years. It won't vanish in 2027. What will change is optionality. Brands will have the choice to use a QR code instead of (or alongside) a 1D barcode. Full industry transition will take years beyond the 2027 milestone. But the direction is clear: 2D codes are coming to the checkout lane.
Quick history of barcode scanning
The first item ever scanned with a UPC barcode was a 10-pack of Wrigley's Juicy Fruit chewing gum. It happened at a Marsh supermarket in Troy, Ohio, at 8:01 AM on June 26, 1974. The pack and receipt are now in the Smithsonian's National Museum of American History.
Three years later, in 1977, European manufacturers adopted EAN-13 as their standard. Code 128 followed in 1981, designed by Computer Identics Corporation for applications needing full ASCII support. Code 39, the older alphanumeric symbology, had already been in use since 1974 but was formally standardized later.
QR codes arrived in 1994, created by Masahiro Hara and his team at Denso Wave. They were designed to be scanned ten times faster than existing 2D codes. The "QR" stands for Quick Response. Denso Wave patented the technology but chose not to enforce the patent, making it a free, open standard (ISO/IEC 18004). That decision is the single biggest reason QR codes became universal.
For 15 years after their invention, QR codes stayed mostly in Japanese factories and logistics. The smartphone revolution changed everything. Once phones shipped with built-in camera apps that could read QR codes (Apple added native support in iOS 11 in 2017), consumer adoption exploded. The COVID-19 pandemic accelerated it further, as restaurants, venues, and health services needed contactless information sharing.
So which one wins?
Neither. They solve different problems.
If you're stocking shelves at a grocery store, you need a UPC barcode. If you're printing a flyer for your coffee shop, you need a QR code. If you're marking circuit boards, you need Data Matrix. If you're issuing driver's licenses, you need PDF417.
The interesting trend is convergence. GS1 Digital Link and Sunrise 2027 are pushing the retail world toward QR codes. Within a few years, the same QR code on a cereal box might serve the cashier's scanner, the shopper's phone, and the supply chain's tracking system. That's not a replacement of the barcode. It's an evolution.
For most people reading this, the practical takeaway is simple: if you need to connect people to a URL, a QR code is the right tool. Create one in seconds, print it anywhere, and it works.
Sources and Further Reading
- ISO/IEC 18004:2015 — The international standard for QR code symbology.
- Denso Wave — QR Code Development Story — How Masahiro Hara and his team invented the QR code in 1994.
- GS1 Digital Link Standard — The specification for encoding product identifiers as web URIs in 2D codes.
- GS1 Sunrise 2027 — GS1's initiative to make retailers ready for 2D codes at checkout by end of 2027.
- Universal Product Code — Wikipedia — History of UPC barcodes from the first scan in 1974 to global adoption.
- Data Matrix — Wikipedia — Overview of the 2D code used in electronics, pharma, and USPS mail.
- PDF417 — Wikipedia — The stacked linear symbology used on driver's licenses and boarding passes.
- Aztec Code — Wikipedia — The 2D code adopted by IATA for mobile boarding passes.
- IATA Common Use Programs — Airline industry standards for boarding pass barcodes.
- FDA UDI System — The FDA's unique device identification requirements that use Data Matrix codes.