1. What is a QR code?
A QR code is a two-dimensional matrix symbology — a grid of black and white squares (called “modules”) that encodes a short payload of data, typically a URL or a string of text. Unlike a one-dimensional barcode, which can only be read along a single axis, a QR code is designed to be captured at any rotation by a single camera frame. That makes it ideal for the messy real world: a phone held at an angle, a sticker on a curved surface, a poster caught in glancing light.
The acronym stands for “Quick Response,” which is what the format was named for: a symbology you can scan and decode in a fraction of a second, without a special handheld unit. Every QR has three large square “finder” patterns in three of its corners. Those patterns let a scanner figure out which way is up, how the symbol is oriented, and how big each module is — all before it even tries to read the payload.
2. A brief history (1994, Denso Wave)
The QR code was invented in 1994 by a team led by Masahiro Hara at Denso Wave, a subsidiary of the Toyota group in Japan. The motivating problem was concrete and unglamorous: Toyota’s just-in-time production line needed to track automotive parts faster than the 20-character ceiling of a linear barcode allowed. A part might carry a dozen barcodes side by side, each scanned in sequence — slow, error-prone, and visually noisy on the assembly-line traveler card.
The team’s answer was a two-dimensional grid that could hold hundreds of times more data in the same footprint. Denso Wave published the symbology openly and chose not to enforce the patent they held on it, which is a large part of why it caught on: vendors could build scanners and encoders without paying royalties.[1] The format was later standardized as ISO/IEC 18004 in 2000 and revised in 2015. The mainstream consumer takeover came roughly two decades after invention — driven first by smartphone cameras that could decode a QR without a dedicated app, and then by contactless payments (UPI in India, PayPay in Japan, WeChat Pay in China) and pandemic-era restaurant menus.
3. How a QR code is built
A QR code is a square grid whose side length depends on its “version.” Version 1 is 21 modules per side; each version up adds four modules per side, all the way up to version 40 at 177 modules. Around the data, the symbol uses a few fixed structural elements:
- Finder patterns — three nested squares in three corners. The scanner locates these first; their characteristic 1:1:3:1:1 ratio of light and dark runs makes them invariant to rotation.
- Alignment patterns — smaller nested squares scattered through the interior on larger versions, used to correct for perspective distortion when the symbol is photographed at an angle.
- Timing patterns— alternating dark/light modules running between the finder patterns, used to lock the scanner’s module-size estimate.
- Quiet zone — a four-module-wide border of background color around the entire symbol. Without it, scanners struggle to distinguish the QR from surrounding content.
The payload itself is encoded in one of four modes — numeric, alphanumeric, byte (used for UTF-8 in practice), or Kanji — each with its own packing efficiency. Before the modules are drawn, the encoder applies one of eight mask patterns, picking the one that balances dark and light modules best so a scanner’s binarization step stays robust under uneven lighting.
4. Reed-Solomon error correction (the magic)
The reason a QR can survive a fingerprint, a tear, or a hand-drawn logo over its center is a layer of error-correcting redundancy built on Reed-Solomon codes[2] — a family of polynomial codes over finite fields, published in 1960. The encoder treats the data as coefficients of a polynomial over GF(28) and appends evaluations of that polynomial at known points; the decoder, given a partially corrupted symbol, can recover the original payload as long as the number of errored bytes stays inside the recoverable budget.
QR exposes four levels of error correction, each with an approximate maximum fraction of the code that can be lost and still recovered:
- L — about 7% of the symbol can be obscured.
- M — about 15%.
- Q — about 25%.
- H — about 30%.
Higher levels are not free. Adding redundancy means the same payload takes more modules; the symbol grows in version and prints larger at the same density. The trade-off is straightforward: spend bytes on resilience, or spend them on payload.
5. How to choose an error-correction level
The tool exposes the same L/M/Q/H choice the spec does. A simple way to pick:
- L (~7%) — clean digital contexts: an on-screen display, a short URL embedded in a slide, indoor signage protected from wear. Smallest symbol for the same payload.
- M (~15%)— the general-purpose default. Most printed flyers, restaurant menus, business cards, conference badges. The right pick when you don’t have a specific reason to climb.
- Q (~25%) — packaging that may be scuffed, outdoor signage in mild conditions, or anywhere a small overlaid logo will eat into the center of the code.
- H (~30%) — industrial labels, outdoor signage in harsh conditions, designs with a large overlaid logo, or anywhere reliability under unknown wear is more valuable than symbol size.
6. Common use cases
The format ended up far broader than “identifying car parts.” A short, non-exhaustive list of where QR codes actually pull their weight in 2026:
- Restaurant menus and ordering flows.
- Event tickets, boarding passes, museum exhibit anchors.
- Wi-Fi handoff (a QR containing SSID, password, and security type, scanned to join without typing).
- Payments — UPI in India, PayPay in Japan, WeChat Pay in China, Pix in Brazil, and many smaller national rails.
- Two-factor authentication setup — TOTP seeds shared between an authenticator app and the issuing service.
- Package tracking and asset labels — the original use case, expanded.
- Mobile deep links into native applications, used in marketing campaigns and out-of-home advertising.
- vCards and business cards.
7. Anti-patterns (what not to do)
QR codes fail in a small number of predictable ways. If your code isn’t scanning, it’s almost always one of these:
- Printing too small for the intended viewing distance. A rough rule of thumb is that the module size should be at least 1/100th of the expected scan distance — a poster scanned from two meters away wants a QR roughly twenty millimeters across at minimum.
- Foreground-to-background contrast below roughly 3:1. Scanners rely on a clean binarization step; low contrast collapses that.
- Removing or shrinking the quiet zone. Without the four-module margin, the finder pattern doesn’t stand out from the surrounding artwork.
- Inverting the polarity (light modules on a dark background). Most modern scanners handle this; some older ones don’t. Stick with dark-on-light unless you have a specific reason.
- Embedding personally-identifying information directly in the code. A QR is plain text; anything you put in it is readable by anyone who scans it.
- Animating, rotating, or scrolling a QR on a video screen. Scanners need a stable frame to lock onto.
- Putting a QR on a reflective glass surface in direct light. The glare alone can defeat the scanner.
8. Designing a QR that actually scans
A few practical rules cover the vast majority of real-world QR design. Use dark-on-light unless you have a reason. Keep the quiet zone. Size for the viewing distance rather than the printable area. If you plan to overlay a logo in the center, pick error correction H so the redundant bytes can absorb the visual damage; keep the overlay’s area under 25% of the symbol to leave comfortable headroom. Test the printed result with two different scanners — a recent iPhone and a recent Android — at the exact distance and lighting where it will live. If both succeed in under a second from a casual angle, the design is sound.
9. About this tool (the privacy footnote)
This generator runs entirely in your browser. The bundle includes a single MIT-licensed QR encoder and a thin canvas rasterizer; no network request carries your QR content. The page does not measure what you type. It does not store anything between reloads. Once the page has loaded, the tool works offline. There is no account, no watermark, and no upsell.
The reason the privacy posture matters is mundane and important: the URLs people put into QR codes routinely contain session tokens, internal hostnames, magic-link credentials, and personal data. Routing those through a third-party server would create a compliance and trust problem with zero corresponding user benefit — QR encoding is small, deterministic, and well-suited to a browser’s capabilities.
10. References
- Denso Wave. “History of QR Code.” https://www.qrcode.com/en/history/ — primary source from the QR code’s inventor.
- Reed, I. S., & Solomon, G. (1960). “Polynomial Codes Over Certain Finite Fields.” Journal of the Society for Industrial and Applied Mathematics, 8(2), 300–304. https://doi.org/10.1137/0108018 — the original Reed-Solomon paper, the mathematical foundation for QR error correction.