Skip to main content
EZQR
Technical·

QR Code vs Barcode: The Honest Technical Difference (and Why Retail Still Uses Linear Codes)

TL;DR

A **linear barcode** (UPC, EAN-13, Code 128) encodes 12-128 characters in vertical bars and reads in one dimension. A **QR code** encodes up to 7,089 numeric or 4,296 alphanumeric characters in a 2D matrix and reads from any angle. Retail point-of-sale still runs on linear barcodes because a $30 laser scanner decodes them in milliseconds; consumer-facing scans run on QR codes because every smartphone is already a 2D imager. Use a [URL QR code](/qr-codes/url) for any consumer scan flow. Use a linear barcode for POS, inventory, and supply chain. Both are governed by ISO standards — [ISO/IEC 18004](https://www.iso.org/standard/62021.html) for QR, [GS1 specifications](https://www.gs1.org/standards/barcodes) for UPC/EAN.

Key Takeaways

  • A linear (1D) barcode encodes data in the relative widths of vertical bars and spaces; a QR code (2D matrix) encodes data in a square grid of black and white modules, allowing data density orders of magnitude higher per unit area.
  • UPC-A holds 12 numeric digits; EAN-13 holds 13; Code 128 holds up to ~128 characters. A QR code at version 40 with error correction L holds 7,089 numeric digits or 4,296 alphanumeric characters — roughly 590x the capacity of UPC-A.
  • Retail point-of-sale still uses linear barcodes because a 1D laser scanner costs $25-50, decodes in under 100ms, and is rated for hundreds of thousands of scans per shift. A 2D imager that can read QR codes typically costs $150-400.
  • QR codes use Reed-Solomon error correction at four selectable levels (7%, 15%, 25%, 30% of codewords recoverable). Linear barcodes have minimal or no error correction; a single damaged bar usually means the scan fails.
  • The honest choice: use a linear barcode when a dedicated scanner is in the loop (POS, warehouse, hospital). Use a QR code when the scanner is a smartphone (marketing, payments, menus, ticketing). Many supply chains use both on the same label.

What "barcode" actually means in 2026 (and the term ambiguity)

You searched "qr code vs barcode" and the first problem is the vocabulary. In everyday speech, "barcode" gets used for any optical code a scanner reads — including QR codes. In technical writing, "barcode" specifically means a 1D linear barcode: data encoded as vertical bars of varying widths, read left-to-right by a laser or linear-imaging scanner. A QR code is technically a 2D matrix code or "matrix symbology" per the official standards.

This matters because the two technologies were designed for completely different jobs. Linear barcodes were invented in the 1950s and standardized in the 1970s (UPC, the Universal Product Code, was first scanned at a checkout in June 1974 on a pack of Wrigley's gum). Their job was retail checkout — encode a 12-digit product identifier, scan it in milliseconds with a fixed laser scanner at a point-of-sale terminal. The format is optimized for that one job.

QR codes were invented in 1994 by Masahiro Hara at Denso Wave, a Toyota subsidiary, to track automotive parts on assembly lines where workers needed to scan thousands of components per shift from arbitrary angles. The "QR" stands for "Quick Response" — the design goal was decoding speed for handheld imagers, not data density per se. The format is optimized for omnidirectional scanning and high error correction.

When we say "barcode" for the rest of this post, we mean linear 1D barcodes. When we say "QR code" we mean the specific 2D matrix code defined by ISO/IEC 18004. Both are correctly called "barcodes" in the colloquial sense, but the engineering trade-offs only make sense when you separate them.

The encoding: 1D bars vs 2D modules

A linear barcode encodes data in one dimension. The information is in the relative widths of black bars and the white spaces between them. A scanner sweeps a laser or linear sensor across the bars, measures the timing of dark-to-light transitions, and decodes the pattern into a string of digits or characters.

Different linear symbologies use different encoding rules. UPC-A (retail in North America) encodes exactly 12 numeric digits using 95 modules — each digit is encoded as 2 bars and 2 spaces of varying widths. EAN-13 (retail in Europe and most of the world) encodes 13 digits in a similar pattern. Code 128 (used in shipping and logistics) is denser — it can encode the full 128-character ASCII set, with the bar pattern varying per character. Code 39 (used in defense, automotive, healthcare) is older and less dense — 43 characters, but human-readable in a pinch because each character is a distinct bar pattern.

A QR code encodes data in two dimensions. The visible pattern is a grid of modules — black or white square cells arranged in a square symbol. The smallest QR (version 1) is 21x21 modules and holds up to 25 alphanumeric characters. The largest (version 40) is 177x177 modules and holds up to 4,296 alphanumeric characters, or 7,089 numeric digits, or 2,953 bytes of binary data. The encoding includes finder patterns (the three big squares in the corners), alignment patterns, timing patterns, format information, and the data itself with Reed-Solomon error correction codewords.

The practical consequence: a UPC barcode is roughly 1.5 inches wide for 12 digits. A QR code holding the same 12 digits is roughly 0.4 inches square — but the QR can hold a full URL, a vCard, a Wi-Fi configuration, or 4 kilobytes of arbitrary data in roughly the same physical footprint. The 2D format is dramatically denser per unit area.

Capacity comparison: how much data each format holds

Capacity is the headline difference between linear and 2D codes. Linear barcodes are designed for short identifiers (product codes, lot numbers, license plates). QR codes are designed for full payloads (URLs, contact cards, payment instructions). The capacity numbers are not close.

SymbologyTypeMax data capacityTypical use
UPC-A1D linear12 numeric digitsNorth American retail POS
EAN-131D linear13 numeric digitsEuropean and global retail POS
Code 391D linear~43 alphanumeric charsDefense, automotive, healthcare
Code 1281D linear~128 ASCII charsShipping, logistics, GS1-128
ITF-141D linear14 numeric digitsOuter cartons in supply chain
QR (v1, ECL L)2D matrix25 alphanumeric charsSmall URLs, short IDs
QR (v10, ECL M)2D matrix213 alphanumeric charsTypical marketing QR (vCard, short URL)
QR (v40, ECL L)2D matrix4,296 alphanumeric / 7,089 numericHigh-capacity payloads, full vCards, encrypted strings
Data Matrix2D matrix2,335 alphanumeric charsSmall-part marking, medical devices, mail

Where linear barcodes still win: retail, supply chain, hospitals

A common assumption is that QR codes have "replaced" linear barcodes. They have not — not even close. Walk into any grocery store, warehouse, hospital, or library and you will see linear barcodes on virtually everything. There are three reasons, and none of them are nostalgia.

Scanner cost. A 1D laser scanner (the red-line scanner you see at a supermarket checkout) costs $25-50 wholesale, has no moving lens, and is rated for hundreds of thousands of scans per shift with negligible maintenance. A 2D imager that can read QR codes uses a small camera and computer-vision decode — wholesale cost is typically $150-400, depending on rated decode speed and ruggedization. Across 50,000 retail checkout lanes in a national grocery chain, that delta is real money.

Decode speed. A laser sweep across a UPC takes 10-30 milliseconds; pattern decoding is essentially a width-measurement problem with a tiny lookup table. A 2D imager has to capture an image, identify the finder patterns, correct for skew and rotation, decode Reed-Solomon error correction, and verify the checksum — typically 50-200 milliseconds even on dedicated hardware. At a retail checkout doing 1,000+ scans per hour, the latency difference adds up.

Ruggedization and read range. A 1D laser scanner reads from 4-12 inches at any angle the laser line crosses the barcode. A 2D imager needs the entire QR to be in frame — closer range, more attention from the operator. In a warehouse where a forklift driver is scanning pallet labels from 8 feet away, the laser scanner wins. The job is different.

Linear barcodes also dominate where the data is short and identifiers are pre-assigned: library books (10-digit ISBN-derived codes), hospital wristbands (patient ID + lot codes for medication matching), airline boarding passes (PDF417, a stacked linear/2D hybrid), and shipping labels (Code 128 with GS1 application identifiers for routing). When the scanner is dedicated hardware and the data is a short identifier, linear is the right format.

Where QR codes won: anywhere the scanner is a smartphone

QR codes won every category where the scanner is a smartphone. Apple shipped native QR scanning in the iOS 11 camera app in 2017; Android added it system-wide in 2018. Once every smartphone became a free 2D imager, the economics flipped — the consumer-facing scan no longer required a dedicated scanner, and the 2D capacity advantage stopped being a liability.

The categories where QR codes dominate today:

  • Restaurant menus. A static QR pointing at a CMS-driven menu page replaced printed laminated menus across most casual-dining brands in 2020-2021. The restaurant menu QR guide covers the implementation specifics.
  • Mobile payments. Alipay and WeChat Pay in China, UPI in India, and EMVCo merchant-presented QR globally all use QR codes for the payment handshake. Linear barcodes physically cannot carry the payload (a payment QR encodes a merchant ID, amount, and cryptographic fields).
  • Event ticketing and boarding passes. A QR-encoded ticket carries enough data to identify the seat, event, and a signed token without a network lookup. Linear barcodes on physical tickets are gone in most modern venues.
  • Marketing and packaging. A QR on packaging links to product information, manuals, recall notices, or marketing content — see the packaging labels guide for production details.
  • Wi-Fi sharing. A Wi-Fi QR code encodes SSID and passphrase in a single scan, no typing required.
  • Multi-destination routing. A single QR can route to different URLs by device, language, or geography — see the multi-URL QR generator for the implementation.

The pattern: when the scanner is a phone, QR wins. When the scanner is a $30 dedicated 1D laser at a checkout, linear still wins. The two technologies do not compete; they live in different rooms.

The cost asymmetry: scanners, imagers, and smartphones

The single biggest reason linear barcodes still exist is the scanner cost asymmetry. The decision to use a 1D versus 2D format is rarely about the code itself — it is about what is scanning the code.

A dedicated 1D laser scanner in 2026 costs $25-50 wholesale for a corded handheld. The optics are simple — a laser diode, a rotating mirror or oscillating prism, and a photodiode to measure the reflected timing. The decoder is essentially a lookup table on a small microcontroller. Rated lifetime: hundreds of thousands of scans, sometimes millions.

A dedicated 2D imager costs $150-400 wholesale. It includes a small CMOS camera, an LED illumination ring (often green for contrast), and a real CPU running computer-vision decode software. It can read both 1D and 2D codes, but the cost reflects the camera and the decode complexity. In retail rollouts at scale, the $100-300 delta per scanner across 50,000 lanes is a hard number to justify.

A smartphone is a free imager from the perspective of the consumer-facing scan. Apple, Google, and Samsung have already paid for the camera, the CPU, and the decode software. The marketer who prints a QR on packaging gets to use that imager without buying anything — every potential customer already has one in their pocket.

The practical decision rule: if the scanner is hardware you buy, linear is almost always cheaper. If the scanner is hardware the customer already owns (a phone), QR is the only option that works.

Tips

  • Retail POS rollouts: use linear UPC/EAN. The scanner cost savings dwarf any data-capacity benefit from going 2D.
  • Warehouse and shipping: Code 128 with GS1 application identifiers handles routing data in a 1D format scanners already support.
  • Consumer-facing marketing or payment: QR codes only. No customer is buying a 1D scanner to interact with your packaging.

Error correction: a real and underrated difference

Linear barcodes have minimal error correction. A UPC has a single checksum digit at the end of the 12-digit string — enough to catch a single transcription error, not enough to recover from a damaged bar. If one bar in a UPC is scratched, smudged, or printed badly, the scan typically fails and the cashier types the digits in by hand.

QR codes use Reed-Solomon error correction at four selectable levels, each trading capacity for resilience:

  • Level L (Low): ~7% of codewords can be damaged or missing; the code still decodes.
  • Level M (Medium): ~15% of codewords recoverable. The default for most QR generators.
  • Level Q (Quartile): ~25% recoverable.
  • Level H (High): ~30% recoverable. Required when adding a center logo or printing on rough surfaces.

The QR error correction guide covers the math and the selection criteria. The practical consequence: a QR code printed on a wrinkled label, scratched, faded, or partially obscured by a coffee stain will often still scan. A linear barcode in the same condition typically will not.

Reed-Solomon is the same family of error correction used in CDs, DVDs, deep-space communication, and QR codes. The reason it works: the data is encoded with redundant codewords distributed across the symbol, so localized damage can be reconstructed from the surrounding intact data. A single 5mm coffee stain on a QR with level H correction usually has zero effect on the scan.

This is one of the engineering wins that makes QR practical for outdoor and packaging use. A 1D barcode on a shipping label that gets scuffed in a sorting facility often becomes unscannable. A QR with level H correction tolerates the same damage and still routes correctly.

Side-by-side: the feature comparison that matters

For most decisions, the trade-offs collapse into seven dimensions. The table below summarizes the comparison for a typical retail UPC-A versus a typical marketing QR (version 10 at ECL M — the default for a short URL with a small logo).

FeatureLinear barcode (UPC-A)QR code (v10, ECL M)
Data capacity12 numeric digits213 alphanumeric chars
Physical footprint~1.5 in wide x 1 in tall~1 in square
Read directionHorizontal only (1D)Any angle (omnidirectional)
Min scan distance4-12 inches (laser)2-24 inches (phone camera)
Scanner cost (dedicated)$25-50 (1D laser)$150-400 (2D imager)
Smartphone scanLimited (most camera apps do not support 1D)Native (iOS 11+, Android 9+)
Error correctionSingle checksum digit7%, 15%, 25%, or 30% recoverable (Reed-Solomon)
Damage toleranceLow (one bar damaged usually fails)High (works with 15-30% obscured)
Print resilienceSensitive to print qualityTolerant of low-DPI print, rough surfaces
Governing standardGS1 / ISO/IEC 15420 (UPC)ISO/IEC 18004

When to use both on the same label (the supply-chain pattern)

A lot of modern packaging carries both a linear barcode and a QR code. This is not redundancy — they are doing different jobs for different scanners.

The linear barcode (typically UPC, EAN, or GS1-128) carries the machine-readable identifier for point-of-sale and inventory systems. The retailer's scanner at checkout reads the UPC, looks up the price, and rings the sale. The warehouse scanner reads the same UPC to confirm the SKU during receiving. These scanners are dedicated 1D laser hardware and the workflow is optimized for them.

The QR code on the same package carries the consumer-facing destination — product information, ingredients, manuals, marketing content, registration, or a customer-service URL. The consumer pulls out their phone, scans the QR, and lands on a page that the retailer's POS scanner could not possibly handle. The two codes coexist because the two scanners coexist.

A growing pattern in supply chain: GS1 Digital Link, which encodes a product identifier in a QR code using a URL syntax. A scanner can parse the URL to extract the GTIN (the global trade item number) for inventory, while a phone can follow the URL to a product page. One code, two readers. The GS1 standards documentation covers the spec.

For logistics, Code 128 with GS1 application identifiers is still the dominant 1D format for routing data — pallet IDs, lot numbers, expiry dates — because the data is short, the scanners are dedicated 1D laser, and the workflow does not need 2D capacity. The retail QR codes guide covers the consumer-facing side.

How to generate either format

Generating a linear barcode and generating a QR code are different workflows because the use cases are different. Linear barcodes are typically generated as part of an enterprise SKU-assignment process (you do not just generate a UPC — you register a GS1 company prefix and assign UPCs from your allocated range). QR codes are generated per-asset, often per-campaign, and can be created free in a few seconds.

Linear barcode generation. For UPC and EAN codes used in retail, register with GS1 for a company prefix, then assign codes from the prefix range using their standards. Code 128 and Code 39 (used internally for inventory, asset tracking, and logistics) do not require GS1 registration — any open-source library will generate them from a string. Standard libraries: python-barcode, JsBarcode, bwip-js.

QR code generation. Use any free QR generator that supports your content type. For a URL, EZQR's URL QR generator takes a destination, applies your color and logo, and outputs a PNG or SVG in seconds. For Wi-Fi credentials, see the Wi-Fi QR guide. For multiple destinations routed by language, device, or geography, the multi-URL QR generator handles routing in a single code.

The practical workflow:

  • Need a QR for marketing, packaging, or consumer scan? Generate one free at EZQR. Static codes are unlimited free; dynamic codes (editable destination, scan analytics) are on the Max plan with monthly billing.
  • Need a UPC for retail? Register with GS1, then generate from your prefix using any barcode library or a dedicated UPC tool.
  • Need both on the same label? Generate the UPC for POS and a separate QR for consumer scan. The two coexist on the artwork.

For packaging-specific guidance (size, placement, error correction level, print resilience), see the QR code best practices guide and the packaging labels production notes.

The questions to ask before you choose

For most decisions, four questions decide the format. Answer them honestly and the choice falls out.

Question 1: What is scanning this code? If the scanner is dedicated POS or warehouse hardware, use a linear barcode. If the scanner is a smartphone, use a QR code. If both are scanning the same label, use both.

Question 2: How much data does the code need to carry? Up to 13 numeric digits: linear is fine (UPC or EAN). Up to 128 characters: Code 128 still works, but at the upper bound a QR is often cleaner. Above 128 characters (a URL with parameters, a vCard, a Wi-Fi config, a payment string): QR is required.

Question 3: Does the code need to survive damage? A UPC on a clean retail package: no problem, linear works. A QR on a shipping label that will get scuffed in a sorting facility: pick QR with error correction level H. A code on outdoor signage exposed to weather: QR with ECL H is the only honest answer.

Question 4: Will the destination need to change after printing? A static QR is permanent; a dynamic QR has an editable destination. Linear barcodes are always "static" in the sense that the encoded data cannot be changed without reprinting. For consumer-facing scans where the destination may evolve, dynamic QR is the right answer — see the permanent QR code generator guide for the vendor-policy implications.

If the answers point to QR, generate one free at EZQR. If the answers point to linear, generate it from your GS1 prefix or use Code 128 for internal use. For a deeper comparison of QR generators specifically, see the best QR code generators in 2026.

The standards: ISO/IEC 18004 vs ISO/IEC 15420

Both QR codes and linear barcodes are governed by international standards, and citing the standard is the cleanest way to verify a vendor or library claim. The standards specify the encoding, the symbology, the error correction, and the print quality requirements.

QR codes: ISO/IEC 18004. The current edition (ISO/IEC 18004:2024) defines four levels of Reed-Solomon error correction (L, M, Q, H), 40 size versions (21x21 modules up to 177x177), and four data encoding modes (numeric, alphanumeric, byte, kanji). Any decoder that claims to support QR codes implements this standard.

UPC-A and UPC-E: ISO/IEC 15420, with GS1 specifications layered on top for the company-prefix system. The standard specifies the 12-digit encoding, the modular structure, and the checksum algorithm.

EAN-13 and EAN-8: ISO/IEC 15420 (same standard, different size variants).

Code 128: ISO/IEC 15417. The Wikipedia Code 128 reference summarizes the symbology if you do not want to buy the ISO copy.

Code 39: ISO/IEC 16388.

Data Matrix: ISO/IEC 16022 (the other major 2D format, used in small-part marking, medical devices, and mail; the Wikipedia barcode reference gives a broader survey).

The practical use of the standards: when a vendor claims "permanent QR codes" or "industry-standard QR generation," the claim is verifiable against ISO/IEC 18004. Any decoder that implements the standard reads any QR that implements the standard — there is no vendor-specific lock-in at the format level. The lock-in only happens on the dynamic-redirect side, where the QR points to a vendor-hosted short URL and the vendor controls whether the redirect stays alive. The permanent QR generator guide covers that risk.

FAQ

What is the difference between a QR code and a barcode?

A traditional barcode is a 1D linear code — data encoded in vertical bars of varying widths, read horizontally by a laser scanner. A QR code is a 2D matrix code — data encoded in a square grid of black and white modules, read from any angle by a camera or smartphone. Linear barcodes hold 12-128 characters; QR codes hold up to 7,089 numeric or 4,296 alphanumeric characters. Linear is used at retail POS; QR is used for consumer-facing scans.

Can a smartphone scan a regular barcode?

Sometimes, but not reliably. Native iOS and Android camera apps support QR codes (and a few formats like EAN-13 and UPC), but most 1D symbologies — Code 39, Code 128, ITF-14 — require a third-party app to decode. For consumer-facing scans where the user is using their phone's native camera, QR codes are the only format that works consistently across iOS and Android.

Why does retail still use barcodes if QR codes hold more data?

Scanner cost and decode speed. A 1D laser scanner costs $25-50 wholesale; a 2D imager costs $150-400. Across 50,000 retail checkout lanes in a national chain, that delta is real money. Laser scanners also decode in 10-30 milliseconds — fast enough for high-volume POS. QR codes hold more data but retail does not need more data per item; it needs fast, cheap scans of short product identifiers. Linear barcodes win that specific job.

How much data can a QR code hold compared to a barcode?

A UPC-A linear barcode holds exactly 12 numeric digits. A Code 128 linear barcode holds up to ~128 ASCII characters. A QR code at the maximum size (version 40) holds 7,089 numeric digits, 4,296 alphanumeric characters, or 2,953 bytes of binary data. The 2D format is roughly 590x denser than UPC-A by character count, and orders of magnitude denser per square inch of print area.

Do QR codes have error correction?

Yes — Reed-Solomon error correction at four selectable levels: L (7% recoverable), M (15%), Q (25%), and H (30%). A QR code printed with level H tolerates roughly 30% of its modules being damaged, smudged, or obscured and still decodes correctly. Linear barcodes have only a single checksum digit, which catches transcription errors but cannot recover from physical damage. See the [QR error correction levels guide](/blog/qr-code-error-correction-levels) for the math.

Are QR codes governed by a standard like UPC?

Yes. QR codes are governed by ISO/IEC 18004, currently in its 2024 edition. The standard defines four error correction levels, 40 size versions (21x21 to 177x177 modules), and four data encoding modes (numeric, alphanumeric, byte, kanji). Any decoder that implements the standard reads any QR that implements it — there is no vendor lock-in at the format level. UPC and EAN are governed by ISO/IEC 15420 with GS1 layered on top for the prefix system.

When should I use a QR code instead of a barcode?

Use a QR code when the scanner is a smartphone — marketing on packaging, restaurant menus, Wi-Fi sharing, payments, ticketing, any consumer-facing scan. Use a linear barcode when the scanner is dedicated POS or warehouse hardware and the data is a short product identifier. Many products use both: a UPC for retail checkout and a QR for consumer-facing information on the same label.

Can I use one code for both retail POS and consumer scanning?

Partially — GS1 Digital Link encodes a product identifier in a QR code using a URL syntax, so a phone can follow the URL and a properly configured POS scanner can extract the GTIN. Adoption is growing but not universal. In most production workflows, the practical answer is to print both: a UPC for the retail POS and a separate QR for the consumer-facing scan. Two codes, two scanners, no compromise on either workflow.

More From This Category

Related Industries

Related Guides

Related Tools

Written by

EZQR Editorial Team
EZQR Editorial Team

The EZQR editorial team writes practical guides on QR code strategy, print workflows, and how small businesses use scan-based technology. Posts are fact-checked against the ISO/IEC 18004 standard and updated when specs or market conditions change.

Ready to create your QR code?

No signup for static codes. Dynamic codes start at $5/mo. No watermarks, no expiry.

Generate a QR code free with EZQR