At a glance, QR codes and barcodes look like cousins — both are machine-readable patterns printed on packaging, labels, and marketing materials. But they encode data differently, serve different scanners, and suit different use cases.
Choosing the wrong one costs real money: a QR code on a warehouse shelf requires every picker to carry a smartphone or 2D imager when a simple barcode and a laser scanner would be faster and cheaper. A barcode on a restaurant menu forces a staff member to take every order verbally when a QR code could serve the menu, payment link, and loyalty sign-up simultaneously.
This guide breaks down exactly how each format works, which barcode types exist within each family, what hardware each requires, and the decision framework for picking the right one — including the GS1 Sunrise 2027 industry shift that is bringing 2D barcodes to retail checkouts globally.
What barcodes and QR codes actually are
The term "barcode" covers any machine-readable pattern that encodes data visually — which technically makes QR codes a type of barcode. In common usage, "barcode" means a 1D linear barcode: a series of parallel black-and-white lines of varying width, read along a single horizontal axis by a laser or LED scanner.
A QR code (Quick Response code) is a 2D matrix barcode invented by Denso Wave in 1994. Instead of lines, it uses a grid of black-and-white squares arranged in a square pattern. Data is encoded in both horizontal and vertical directions simultaneously, which is why a QR code can hold vastly more information in roughly the same physical space.
Data Matrix is another common 2D format — smaller than a QR code, preferred for tiny items like electronic components and medication doses. PDF417 is a 2D stacked format used on driver's licenses and airline boarding passes. This guide focuses on standard 1D barcodes and QR codes since they cover the vast majority of consumer, retail, and marketing use cases.
Data storage: why the difference is larger than it looks
A standard UPC-A barcode encodes exactly 12 numeric digits — the Global Trade Item Number (GTIN) that identifies a product. That number points to a product record in a retailer's database. The barcode itself carries no product name, price, description, or image. All of that information lives in the database, looked up by the 12-digit key.
Code 128, the workhorse of shipping and logistics, can encode up to 128 characters including letters, numbers, and symbols — enough for a tracking number, a shipment ID, or a serial number with a prefix. Still no room for a URL, let alone a contact record or a paragraph of text.
A QR code holds up to 4,296 alphanumeric characters, 7,089 purely numeric characters, or 1,817 Kanji characters. That is enough space for a full URL with UTM parameters, a complete vCard contact record (name, multiple phone numbers, email, address, and social profiles), a Wi-Fi network name and password, or a 4,000-character block of plain text.
The practical implication is that a barcode requires a database lookup to be useful — the barcode is just a key. A QR code can carry the entire payload in the pattern itself, which is why it works for marketing, menus, and direct-to-consumer applications where no back-end database is involved.
QR code vs barcode: at a glance
| Feature | 1D Barcode | QR Code |
|---|---|---|
| Data capacity | Up to 128 characters (Code 128) | Up to 4,296 alphanumeric chars |
| Encodes a URL | ✗No | ✓Yes |
| Smartphone readable (native) | No — requires dedicated app | Yes — built into camera app |
| Laser scanner readable | ✓Yes | No — needs 2D imager |
| Error correction | None (most formats) | Yes — up to 30% damage tolerance |
| GS1 retail standard | Yes (UPC-A / EAN-13) | GS1 QR from 2027 (Sunrise initiative) |
| Primary use case | Retail POS, logistics, warehousing | Marketing, menus, payments, packaging |
Most operations need both: a UPC/EAN for checkout scanning and a QR code for consumer engagement.
The main barcode types and where each one lives
UPC-A (Universal Product Code) is the 12-digit barcode on almost every consumer product sold in the United States. It was standardised in 1974 and remains the dominant retail format in North America. The smaller UPC-E compresses UPC-A to 6 digits for use on tiny packaging where space is limited.
EAN-13 (European Article Number) is the 13-digit equivalent used in Europe, Asia, Australia, and most of the world outside the US and Canada. Functionally identical to UPC-A — both encode a GTIN and require a database lookup at POS.
Code 128 is the standard for shipping labels, warehouse inventory, and supply chain tracking. It can encode the full ASCII character set and is far denser than Code 39, meaning a Code 128 barcode carrying the same data can be printed significantly smaller. FedEx, UPS, USPS, and most major logistics networks use Code 128 variants.
Code 39 is an older, less dense format still common in automotive manufacturing, US Department of Defense applications, and hospital inventory labels for medical devices. It encodes only 43 characters (A-Z, 0-9, and a handful of symbols) and does not require a checksum digit, which simplifies implementation in legacy systems.
ITF-14 is used on outer shipping cartons (cases and pallets) rather than individual retail units. It encodes a 14-digit GTIN and is designed to be readable on corrugated cardboard where printing quality can be inconsistent.
What QR codes can actually encode
Because of their data capacity, QR codes are format-agnostic. They can carry structured data types that smartphones and apps recognise and act on — not just raw text.
URL: the most common use. The phone opens the link in its default browser immediately after scanning. No app, no manual typing.
vCard / MeCard: contact records. Scanning adds the person directly to the phone's address book — name, phone, email, company, and address in a single scan.
Wi-Fi credentials: network name, password, and security type encoded in the QR pattern. Scanning connects the device automatically — no typing required.
mailto / tel / sms: tapping a scanned QR opens a pre-addressed email, a call with a number dialled, or an SMS compose window with a pre-filled message and recipient.
Payment links: most payment platforms (Stripe, PayPal, UPI, WeChat Pay, Alipay) encode checkout URLs into QR codes for contactless payment at physical locations.
Plain text: notes, product descriptions, ingredient lists — anything up to about 4,000 characters.
For marketing and consumer engagement, the URL format is by far the most useful — especially combined with UTM parameters and a dynamic short link that lets you update the destination without reprinting.
Scanning hardware: when a phone works and when it does not
Any iPhone running iOS 11 or later can scan QR codes natively through the Camera app — no third-party app required. Android added native QR scanning to the Camera app in Android 9 (2018), and Google Lens handles it on most modern Android devices automatically. For consumer-facing use cases, the smartphone is a zero-friction QR scanner.
Traditional 1D laser scanners — the kind used at retail checkouts, warehouse picking stations, and hospital inventory systems — physically cannot read QR codes. They work by firing a laser beam and measuring the reflected pattern of lines. QR codes require a camera-based 2D imager to capture the full matrix image before decoding it.
For operations that scan hundreds or thousands of codes per shift, dedicated scanning hardware remains superior to smartphones: faster decode time, ruggedised housing, longer battery life, keyboard-wedge or Bluetooth output, and IP ratings for warehouse dust and moisture. In these environments, upgrading from a 1D laser scanner to a 2D imager is the practical step that enables QR and Data Matrix support alongside legacy 1D codes.
The scanning requirement is a real operational constraint. A restaurant switching from printed menus to QR menus gains nothing from expensive hardware upgrades — every customer's phone does the scanning. A manufacturer replacing barcode labels on components with Data Matrix codes needs to audit every scan station on the line to confirm 2D imager capability before rollout.
When to use a barcode
Use a 1D barcode when the primary use case is high-volume scanning in a controlled environment with dedicated hardware — retail checkout, warehouse picking, shipping label scan, hospital inventory.
Use UPC-A or EAN-13 if you are selling physical products in retail stores. Retailers require a GS1-registered GTIN for every unique product, and the barcode is the standard print format for it. There is no decision here — the standard is mandatory.
Use Code 128 for shipping labels, internal warehouse labels, asset tracking, and any logistics workflow where data density matters and scanners are purpose-built hardware. FedEx, UPS, and USPS require Code 128 on shipment labels.
Use Code 39 for legacy environments where simplicity and backwards-compatibility with older scanners matter more than density — military, automotive manufacturing, older hospital systems.
The compelling advantage of 1D barcodes in operational environments is scan speed. A trained warehouse picker with a 1D laser scanner can scan 40-60 items per minute. A 2D imager scanning QR codes from shelves is broadly similar, but legacy 1D infrastructure is already installed and working in most facilities.
When to use a QR code
Use a QR code when the primary scanner is a consumer smartphone, when you need to encode more data than a numeric product ID, or when you want to link physical material to a dynamic digital destination.
Marketing and print campaigns are the strongest QR use case. A poster, flyer, billboard, or business card with a QR code lets anyone with a phone tap through to a landing page, video, or offer without typing a URL. Combined with UTM parameters and a dynamic short link, every scan is tracked and attributable.
Restaurant menus and hospitality. Digital menus accessed by QR code reduce printing costs, allow real-time menu updates, and enable upselling via the menu interface. QR codes on tables can also link to payment, feedback, and loyalty sign-up flows.
Contactless payments. QR-based payment is the dominant model in India (UPI), China (WeChat Pay / Alipay), and Southeast Asia. It is growing in Western markets as an alternative to NFC for small merchants who want low-cost checkout infrastructure.
Product packaging consumer engagement. Brands add QR codes to packaging for product stories, recipe videos, sustainability reports, ingredient detail pages, and loyalty programme entry. This is the engagement layer that barcodes cannot support — they only encode an identifier, not a destination.
Event tickets and boarding passes. Dynamic QR codes used for event entry can be invalidated after first scan, preventing duplication.
GS1 Sunrise 2027: why 2D barcodes are coming to every retail shelf
GS1 Sunrise 2027 is a global retail industry initiative requiring all point-of-sale systems to read 2D barcodes — specifically GS1 QR Code and GS1 DataMatrix — alongside traditional 1D UPC and EAN codes by the end of 2027. Pilots are underway in 48 countries representing 88% of world GDP.
The driver is data. A UPC barcode carries only the 14-digit GTIN. A GS1 QR code on the same product can carry the GTIN, batch number, expiry date, serial number, and a consumer-facing URL in a single scan — enabling fresh food traceability, recall management, and consumer engagement in one code.
For brands and manufacturers, this means that packaging designed after 2025 increasingly needs to carry both a 1D barcode (for backward compatibility with scanners that have not yet upgraded) and a 2D code. GS1 provides a dual-symbology label standard for the transition period.
For retailers, it means upgrading checkout scanner hardware and POS software before the 2027 deadline. Most modern 2D imagers already handle both formats — the investment is primarily in software updates to extract and process the additional data fields that 2D codes carry.
The practical takeaway for anyone designing product labels or retail packaging now: include a GS1 DataMatrix or GS1 QR code alongside your UPC/EAN if you want your product to be 2027-ready, and ensure your label layout accommodates both symbologies.
Packaging designed after 2025
Include both a UPC/EAN barcode (for current POS systems) and a GS1 DataMatrix or GS1 QR code on the same label. Use a dual-symbology layout to support legacy scanners and the incoming 2D-capable infrastructure simultaneously.