What Are QR Codes and How Do They Work
QR codes, short for Quick Response codes, are two-dimensional barcodes invented in 1994 by Denso Wave, a Toyota subsidiary, for tracking automotive parts during manufacturing. Unlike traditional one-dimensional barcodes that encode data only horizontally, QR codes encode data in both horizontal and vertical dimensions, allowing them to store vastly more information in a compact square footprint.
A QR code is essentially a matrix of black and white modules arranged in a square grid. The pattern of light and dark squares encodes binary data, and a compatible scanner — typically a smartphone camera with decoding software — captures the image, processes it, and extracts the encoded payload. The payload can be a URL, plain text, contact information (vCard), calendar events, Wi-Fi credentials, payment instructions, or any other data representable as bytes.
The "Quick Response" name reflects the original design goal: fast, reliable decoding even when the code is damaged, partially obscured, or viewed at an angle. Built-in error correction, finder patterns in three corners for orientation, and timing patterns that synchronize the grid all contribute to this resilience. Today, QR codes are ubiquitous on advertisements, packaging, tickets, restaurant menus, and product labels, bridging the physical and digital worlds.
- Invented in 1994 by Denso Wave for automotive parts tracking
- Two-dimensional matrix barcode storing data horizontally and vertically
- Decoded by smartphone cameras or dedicated scanners
- Can encode URLs, text, contacts, Wi-Fi credentials, and more
The Structure of a QR Code
A QR code is not a random jumble of squares. Its internal structure is precisely defined by the ISO/IEC 18004 standard, with specific regions serving specific purposes. Understanding this structure helps explain why QR codes look the way they do and how scanners locate and decode them so quickly.
Three large square patterns in the top-left, top-right, and bottom-left corners are called finder patterns. They allow the scanner to identify the code and determine its orientation and skew. A smaller alignment pattern in the bottom-right area helps the decoder account for distortion when the code is viewed at an angle or on a curved surface. Timing patterns — alternating black and white modules — run between the finder patterns and provide a reference for the module grid size.
Surrounding the finder patterns are format information modules that encode the error-correction level and mask pattern used. The bulk of the QR code is divided into data and error-correction codewords, which hold the actual payload and redundancy data. A quiet zone — a margin of white space at least four modules wide — surrounds the entire code so the scanner can reliably distinguish the code from surrounding content.
- Finder patterns in 3 corners for orientation and detection
- Alignment pattern for distortion correction
- Timing patterns synchronize the module grid
- Format information encodes error-correction level and mask
- Quiet zone of white space surrounds the code
Common QR Code Use Cases
QR codes have found their way into nearly every industry, serving as a frictionless bridge between physical objects and digital experiences. In marketing and advertising, QR codes on posters, billboards, and packaging direct consumers to landing pages, promotional videos, or app downloads without making them type a URL. Restaurants adopted QR codes en masse during the pandemic to present menus without physical contact, and many have kept them for the cost savings and flexibility.
In payments, QR codes enable mobile wallets and bank transfers without specialized hardware. A merchant can display a QR code that, when scanned, opens a payment flow with the amount and recipient pre-filled. This has driven financial inclusion in many countries where merchants could not afford traditional point-of-sale terminals. Ticketing and event management rely on QR codes for admission control, with each ticket carrying a unique code that can be validated at the gate.
Inventory and supply-chain applications — the original use case — remain important. QR codes on pallets, cases, and individual items carry serial numbers, batch information, manufacturing dates, and origin data. Field technicians scan codes on equipment to pull service histories, manuals, and warranty information. The versatility of QR codes makes them suitable for almost any scenario where a small label must carry information accessible to anyone with a smartphone.
- Marketing: drive users to landing pages, videos, and app downloads
- Payments: mobile wallets and bank transfers without POS hardware
- Ticketing: event admission, boarding passes, transit fares
- Menus: contactless restaurant and venue menus
- Inventory: track items through manufacturing and supply chains
- Wi-Fi sharing: encode SSID and password for one-tap connection
Designing Effective QR Codes
A QR code only works if it can be scanned reliably. Designers who customize QR codes with logos, colors, or reshaped modules risk breaking the code entirely. The first rule of QR code design is to test with real devices under realistic conditions — what looks beautiful in a design tool may be unreadable to a phone camera in dim light.
Contrast is the most critical visual factor. Traditional black-on-white QR codes scan most reliably, but other high-contrast combinations work too. Always keep the foreground darker than the background and avoid gradients, which can create areas of low contrast. If you must use color, test with multiple devices and lighting conditions to ensure consistent scanning.
Size and placement matter as much as color. The minimum recommended size depends on scanning distance: roughly 1 inch for scans from a few inches away, 2-3 inches for arm's length, and larger for billboards or posters scanned from far away. Leave the required quiet zone around the code — never let text or graphics bleed into it. When adding a logo to the center, use a small logo (no more than 20-25% of the code area) and choose a high error-correction level to compensate for the data obscured by the logo.
- Maintain high contrast between foreground and background
- Avoid gradients that create low-contrast regions
- Size the code appropriately for the expected scan distance
- Preserve the quiet zone around the code
- Keep logos small (under 25% of code area) with high error correction
QR Code Error Correction
One of the most powerful features of QR codes is built-in error correction based on Reed-Solomon coding. Error correction allows a QR code to be scanned correctly even when part of it is damaged, obscured, or intentionally modified — for example, when a logo is placed in the center. The standard defines four error-correction levels, each trading capacity for resilience.
Level L recovers up to 7% of data, Level M recovers up to 15%, Level Q recovers up to 25%, and Level H recovers up to 30%. Higher error-correction levels make the code more robust but reduce the amount of data that can be encoded because more of the modules are dedicated to redundancy. Most generators default to Level M, which offers a good balance for typical use cases.
Choose the error-correction level based on the environment and use case. For printed codes that might be smudged, scratched, or exposed to weather, use Level H. For codes displayed on screens where they are unlikely to be damaged, Level L may be sufficient and allows more data. If you plan to overlay a logo or stylize the code, use Level H so the obscured modules can be reconstructed from the redundancy data.
- Level L: ~7% recovery, highest data capacity
- Level M: ~15% recovery, balanced default for most uses
- Level Q: ~25% recovery, for industrial or outdoor environments
- Level H: ~30% recovery, required when overlaying logos or styling
Choosing the Right QR Code Tool
Hundreds of QR code generators exist online, and they vary widely in quality, features, and trustworthiness. The most important considerations when choosing a tool are output format flexibility, customization options, error-correction control, and — critically — privacy. Many free generators track scans by routing the encoded URL through their own redirect service, which means they can see who scans your code, when, and where.
For static QR codes — where the payload is encoded directly in the code — privacy is straightforward: choose a generator that produces the code entirely client-side so your data never touches a server. Our QR Code Generator runs in your browser, meaning the URLs, text, or other content you encode never leave your machine. This matters for codes containing personal contact information, internal URLs, or sensitive identifiers.
Dynamic QR codes, which encode a short redirect URL pointing to a server you control, allow you to change the destination after the code is printed. This is useful for marketing campaigns where you may need to update a landing page. However, dynamic codes introduce a dependency on the redirect service: if it shuts down, every code you printed stops working. Weigh the flexibility against the long-term reliability of the provider, and consider self-hosting the redirect endpoint for critical campaigns.
- Prefer client-side generators that do not log your encoded data
- Choose tools that let you set error-correction level and module size
- Look for PNG, SVG, and PDF export options for print and digital use
- Be cautious with dynamic QR codes — they depend on a redirect service
- Test generated codes with multiple devices before printing at scale