Generator

QR Codes: How They Work and Where They're Used

QR codes encode URLs, text, and contact info in a 2D barcode that any smartphone camera can read. Learn the structure, error correction levels, and use cases.

Published August 5, 2026

Try it yourself

QR Code — free, instant, client-side

Open QR Code

What Is a QR Code?

A Quick Response (QR) code is a two-dimensional barcode that stores data as a matrix of black and white squares. Developed by Denso Wave (a Toyota subsidiary) in 1994 for tracking automotive parts, QR codes became a consumer technology when smartphone cameras gained the ability to decode them natively.

Unlike traditional barcodes (which are one-dimensional and can only store about 20 numeric characters), QR codes can encode up to 3,000 bytes of arbitrary data.

Structure of a QR Code

A QR code consists of several functional regions:

Finder patterns. Three identical square patterns in the top-left, top-right, and bottom-left corners. The scanner uses these to locate and orient the code regardless of angle or rotation.

Alignment patterns. Additional square patterns in larger QR codes that help the scanner correct for distortion.

Timing patterns. Alternating black and white modules running between the finder patterns that help the scanner determine module size.

Format information. Encoded in two strips near the finder patterns. Contains the error correction level and mask pattern used.

Data and error correction. The remaining modules encode the actual data plus Reed–Solomon error correction codes.

Error Correction Levels

QR codes have four error correction levels, which determine how much of the code can be damaged or obscured while still being readable:

Level Recovery Capacity Size Penalty
L (Low) ~7% Smallest
M (Medium) ~15% Moderate
Q (Quartile) ~25% Large
H (High) ~30% Largest

Higher error correction means more redundancy, which means a larger code for the same data. For use cases where the QR code will be printed on packaging or displayed in challenging environments, use Q or H. For digital displays where the image quality is guaranteed, L or M is sufficient.

The high error correction level also makes it possible to place a logo in the centre of a QR code — as long as the logo covers no more than the correctable percentage of the code.

Data Encoding Modes

QR codes support multiple encoding modes, automatically selected based on the content:

  • Numeric — digits 0–9 only (most efficient)
  • Alphanumeric — digits, uppercase letters, and a few symbols
  • Byte — arbitrary bytes (UTF-8 text, URLs)
  • Kanji — double-byte Japanese characters

Common Use Cases

URLs. The most common use: point a smartphone camera at the code and it opens a website. Used on packaging, posters, business cards, restaurant menus.

WiFi credentials. A QR code can encode WiFi network name and password. Scanning it connects the device without typing.

vCards and contact information. Encode contact details so scanning adds them to the phone's address book.

Payment. Many payment systems (especially in Asia) use QR codes for transactions.

Authentication (TOTP). Two-factor authentication apps like Google Authenticator use QR codes to securely transfer the TOTP secret during setup.

Try It

The QR Code generator on Syntaxly generates QR codes for any URL or text in the browser. Supports configurable error correction levels and image download.

Try it yourself

QR Code — free, instant, client-side

Open QR Code

More Generator guides

Generator

Color Theory for Developers: Harmonies and Design Systems

Color choice is one of the most impactful design decisions in a UI. Learn the color models, harmony rules, and how to build a design system palette.

Generator

URL Slugs: SEO-Friendly URL Design Principles

A slug is the human-readable part of a URL. Learn how to generate clean slugs, what makes a URL SEO-friendly, and the edge cases your generator needs to handle.

Generator

UUIDs Explained: Versions, Formats, and When to Use Each

UUIDs are the standard for generating unique identifiers without coordination. Learn the differences between v1, v4, v5, v6, and v7, and which to use in your application.

© 2026. Syntaxly | Built for the minimalist developer.