What Are QR Codes?
QR (Quick Response) codes are two-dimensional barcodes that store data in a grid of black and white squares. Invented by Denso Wave in 1994 for tracking automotive parts, they've become ubiquitous — from restaurant menus to payment systems. Any smartphone camera can scan them instantly.
Types of QR Code Content
- URL — Open a webpage:
https://example.com - Wi-Fi — Auto-connect:
WIFI:T:WPA;S:NetworkName;P:password;; - vCard — Share contact information
- Email — Pre-fill email:
mailto:user@example.com?subject=Hello - Phone — Dial a number:
tel:+1234567890 - SMS — Pre-fill text message
- Plain text — Display any text string
- Calendar event — Add to calendar app
Error Correction Levels
QR codes have built-in error correction that allows scanning even if part of the code is damaged:
| Level | Recovery | Best For |
|---|---|---|
| L (Low) | ~7% | Digital screens, clean environments |
| M (Medium) | ~15% | General purpose (recommended default) |
| Q (Quartile) | ~25% | Outdoor signage, rough surfaces |
| H (High) | ~30% | Codes with logos overlaid, harsh conditions |
Sizing and Placement Guidelines
- Minimum size: 2×2 cm (0.8×0.8 inches) for close-range scanning
- Distance rule: QR code width should be 1/10th of the scanning distance
- Quiet zone: Leave at least 4 modules of white space around the code
- Contrast: Dark modules on a light background (not inverted)
- Avoid: Glossy surfaces that cause glare, curved surfaces, and very small print
Static vs Dynamic QR Codes
Static QR codes encode the data directly in the pattern:
- Data is permanent — can't be changed after printing
- Work offline — no server dependency
- Free to generate
Dynamic QR codes encode a redirect URL that points to your content:
- Change the destination without reprinting
- Track scans (location, device, time)
- Require a hosting service
QR Codes in Code
// JavaScript with qrcode library
import QRCode from 'qrcode'; // Generate as data URL
const dataUrl = await QRCode.toDataURL('https://example.com', { errorCorrectionLevel: 'M', width: 300, margin: 2
}); // Generate as SVG string
const svg = await QRCode.toString('https://example.com', { type: 'svg'
});Real-World Use Cases
- Marketing — Link to landing pages, social profiles, or app downloads
- Payments — Mobile payment (Venmo, CashApp, crypto wallets)
- Authentication — Two-factor authentication setup (TOTP)
- Networking — Share Wi-Fi credentials without typing passwords
- Events — Digital tickets and check-in systems
- Documentation — Link physical manuals to online resources
Generate QR Codes Now
Create QR codes instantly with our free QR Code Generator — supports URLs, Wi-Fi, vCards, and plain text with customizable size and error correction levels.