QR Codes: More Than Just URLs
QR (Quick Response) codes can encode up to 4,296 alphanumeric characters in a scannable 2D pattern. They're used for URLs, WiFi passwords, payment info, contact cards, and authentication.
What Can a QR Code Contain?
| Type | Format | Example |
|---|---|---|
| URL | Plain URL | https://example.com |
| WiFi | WIFI:T:WPA;S:NetworkName;P:password;; | Auto-connect to WiFi on scan |
mailto:user@example.com | Opens email composer | |
| Phone | tel:+15551234567 | Initiates phone call |
| SMS | sms:+15551234567?body=Hello | Opens SMS with pre-filled text |
| vCard | BEGIN:VCARD\nFN:John Doe\n... | Adds contact to phone |
| Text | Plain text | Any text up to ~4000 chars |
Error Correction Levels
QR codes can be partially damaged and still scan, thanks to Reed-Solomon error correction:
| Level | Recovery | Use Case |
|---|---|---|
| L (Low) | ~7% | Clean environments, maximum data capacity |
| M (Medium) | ~15% | General use (default) |
| Q (Quartile) | ~25% | Industrial, moderate damage expected |
| H (High) | ~30% | Logo overlay — code works even with center covered |
Generating QR Codes Programmatically
// Node.js
import QRCode from 'qrcode';
// Generate PNG
await QRCode.toFile('qr.png', 'https://example.com', {
errorCorrectionLevel: 'M',
width: 300,
});
// Generate SVG string
const svg = await QRCode.toString('https://example.com', {
type: 'svg',
});# Python
import qrcode
qr = qrcode.QRCode(error_correction=qrcode.constants.ERROR_CORRECT_M)
qr.add_data('https://example.com')
qr.make(fit=True)
img = qr.make_image()
img.save('qr.png')WiFi QR Code Format
WIFI:T:WPA;S:MyNetwork;P:MyPassword;H:false;;
T = Authentication type (WPA, WEP, nopass)
S = SSID (network name)
P = Password
H = Hidden network (true/false)Print this QR code and guests can join your WiFi by scanning — no typing passwords.
Generate QR codes: QR Code Generator — create QR codes for URLs, text, and more. Also try WiFi QR Code for sharing WiFi passwords.