Security Tools

QR Code Complete Guide: Generate, Read, and Use QR Codes Effectively

Everything you need to know about QR codes — how they work, what data they can encode, best practices for design, and how to read QR codes from images.

6 min read

QR code on a smartphone screen

QR codes have made a remarkable comeback — from restaurant menus to payment systems, event tickets to product packaging. Understanding how to generate them correctly, what data formats they support, and how to make them scannable in the real world is genuinely useful knowledge for developers, designers, and marketers alike.

How QR codes work

A QR code (Quick Response code) is a two-dimensional matrix barcode invented by Denso Wave in 1994. Unlike a 1D barcode that stores data in one direction, a QR code stores data in both dimensions — enabling far more information in a smaller space.

Structure of a QR code:

  • Finder patterns — the three square corners that help scanners locate and orient the code
  • Timing patterns — alternating black/white modules that help scanners determine module size
  • Alignment pattern — helps correct distortion (versions 2+)
  • Data modules — the actual encoded information
  • Quiet zone — white border required around the code (minimum 4 modules)

Error correction levels:

Level Recovery capacity Use case
L (Low) ~7% Digital displays, clean environments
M (Medium) ~15% General purpose
Q (Quartile) ~25% Industrial environments
H (High) ~30% Printed materials, logos overlaid

Higher error correction allows more data to be recovered if the code is partially damaged — and enables you to put a logo in the center without breaking the code.

What data can a QR code encode?

QR codes support several data types with different scanner behaviors:

Plain URL (most common)

https://example.com/product/abc123

Scanner opens the URL in the browser. Always use HTTPS.

Plain text

Welcome to our store! Ask staff for today's specials.

Email

mailto:hello@example.com?subject=Inquiry&body=Hello

Opens the email client pre-filled.

Phone number

tel:+15551234567

Prompts to call the number.

SMS

smsto:+15551234567:Hello, I'd like to book a table

WiFi credentials

WIFI:T:WPA;S:MyNetworkName;P:MyPassword123;;

Automatically connects to WiFi when scanned — perfect for hospitality.

vCard (contact info)

BEGIN:VCARD
VERSION:3.0
FN:Jane Smith
ORG:Acme Corp
TEL:+15551234567
EMAIL:jane@acme.com
URL:https://acme.com
END:VCARD

Adds a contact to the phone's address book.

Calendar event

BEGIN:VEVENT
SUMMARY:Team Standup
DTSTART:20260415T090000Z
DTEND:20260415T093000Z
DESCRIPTION:Daily sync
END:VEVENT

Generate any of these formats instantly with our QR Code Generator — choose the data type and get a scannable QR code in seconds.

URL shortening for QR codes

The more data in a QR code, the denser the pattern and the harder it is to scan. Keep URLs short:

  • Use a URL shortener (bit.ly, short.io) for long URLs
  • Use your own short domain for branded codes
  • Avoid excessive UTM parameters in the QR itself — apply them at the redirect layer

For example:

Bad:  https://mystore.com/products/shoes?utm_source=flyer&utm_medium=print&utm_campaign=spring2026&utm_content=qr
Good: https://s.mystore.com/spring26 → redirects with UTM params applied server-side

Design best practices

Size requirements

Scanning distance Minimum QR size
20 cm (phone held close) 2 × 2 cm
1 meter 10 × 10 cm
3 meters 30 × 30 cm

The 10:1 ratio rule: QR code size should be 1/10th of the scanning distance.

Contrast requirements

  • Minimum contrast ratio: 4:1 between modules and background
  • Dark modules on light background is safest
  • Avoid: light on light, patterned backgrounds, overlapping busy images

Logo overlay

You can place a logo in the center if:

  • The logo covers no more than 30% of the code area
  • Error correction level is set to H (high)
  • The code is tested on multiple devices after adding the logo
  • Export as SVG for perfect scaling at any print size
  • Never rasterize at low resolution — a blurry QR code won't scan
  • Add sufficient quiet zone (white border) — at least 4 module widths
  • Test the final print-ready file, not just the screen version

Dynamic vs. static QR codes

Static QR codes encode the destination directly. They're free, work forever, but the data is fixed — changing the URL requires a new QR code.

Dynamic QR codes encode a short redirect URL. The destination can be changed any time through a dashboard, and you get scan analytics (location, device, time). These are provided by services like QR Code Generator Pro, Bitly, or Beaconstac.

For printed materials that need to be updated (menus, packaging, posters), dynamic codes are worth the subscription cost.

Reading QR codes from images

If you receive a QR code image and need to decode it — without a phone camera — use our QR Code Reader. Upload the image and get the decoded content instantly, entirely in your browser.

Common use cases:

  • Verifying a QR code you've generated before printing
  • Extracting WiFi credentials from a screenshot
  • Decoding QR codes in product photos
  • Testing QR codes in web mockups

Barcodes vs. QR codes

Not every product needs a QR code. Traditional barcodes are still widely used:

Format Capacity Use case
QR Code ~3000 chars URLs, contacts, WiFi, rich data
Code 128 Variable alphanumeric Shipping labels, inventory
EAN-13 13 digits Retail product identification
UPC-A 12 digits US retail, point of sale

Generate Code 128 and EAN-13 barcodes with our Barcode Generator for inventory management, shipping labels, and product identification.

QR code checklist

  • Use HTTPS for all URLs
  • Keep the encoded data as short as possible
  • Set error correction to H if adding a logo
  • Test on at least 3 different devices before publishing
  • Ensure sufficient quiet zone on all sides
  • Verify contrast between modules and background
  • Use SVG format for print materials
  • Consider dynamic codes for printed materials that may need updating

QR codes bridge the physical and digital worlds. A well-designed, properly tested QR code silently does its job millions of times. A broken one just frustrates people who are genuinely trying to engage.