QR codes have become ubiquitous — from restaurant menus and product packaging to contactless payments and event check-ins. As a developer, understanding how QR codes work and the different data formats they support lets you create useful integrations for clients, users, and internal tools.
QR (Quick Response) codes are two-dimensional matrix barcodes invented by Denso Wave in 1994. Unlike traditional barcodes which store data in one dimension, QR codes encode data in both horizontal and vertical directions, allowing them to store significantly more information — up to 7,089 numeric characters or 4,296 alphanumeric characters.
QR codes can encode various types of structured data. Here are the most commonly used formats:
The most common QR code type. Simply encode the full URL:
https://devtoolkit.ink/tools/qr-code-generator
When scanned, the device opens the URL in its default browser. Always use HTTPS URLs — check your SSL certificate to ensure the link works securely.
WiFi QR codes let guests connect to your network without typing the password. The format is:
WIFI:T:WPA;S:NetworkName;P:YourPassword;H:false;;
T = Authentication type (WPA, WEP, nopass)
S = SSID (network name)
P = Password
H = Hidden network (true/false)
Practical uses: office guest WiFi, hotel rooms, Airbnb properties, retail stores, conference venues. Generate a strong WiFi password with the Password Generator.
vCard QR codes encode contact details that can be saved directly to the phone's address book:
BEGIN:VCARD
VERSION:3.0
N:Doe;John
FN:John Doe
ORG:DevToolKit
TITLE:Developer
TEL;TYPE=CELL:+1-555-123-4567
EMAIL:[email protected]
URL:https://devtoolkit.ink
ADR;TYPE=WORK:;;123 Dev St;San Francisco;CA;94102;US
END:VCARD
Great for business cards, conference badges, and email signatures.
mailto:[email protected]?subject=Hello&body=I%20found%20you%20via%20QR
Opens the default email client with pre-filled fields. Use URL encoding for special characters in the subject and body.
tel:+15551234567
Opens the phone dialer with the number pre-filled.
smsto:+15551234567:Hello from DevToolKit!
Any arbitrary text string. Useful for serial numbers, product codes, internal identifiers, or displaying a message.
geo:37.7749,-122.4194
Opens the default maps application and drops a pin at the specified coordinates.
QR codes include built-in error correction using Reed-Solomon codes, which allows them to be scanned even when partially damaged or obscured. There are four levels:
| Level | Recovery Capacity | Data Overhead | Best For |
|---|---|---|---|
| L (Low) | ~7% damage recovery | Minimal | Clean environments, digital screens |
| M (Medium) | ~15% damage recovery | Moderate | General use (default) |
| Q (Quartile) | ~25% damage recovery | Higher | Printed materials, labels |
| H (High) | ~30% damage recovery | Highest | Harsh environments, logos overlaid |
Use level H if you plan to place a logo or image in the center of the QR code. The high error correction compensates for the obscured modules.
| Scanning Distance | Minimum QR Size | Use Case |
|---|---|---|
| 10 cm (4 in) | 2 cm (0.8 in) | Business cards, labels |
| 30 cm (12 in) | 3 cm (1.2 in) | Flyers, product packaging |
| 1 m (3 ft) | 10 cm (4 in) | Posters, signage |
| 5 m (16 ft) | 50 cm (20 in) | Banners, billboards |
The general rule is: QR code size should be at least 1/10th of the scanning distance.
# Python (qrcode library)
import qrcode
img = qrcode.make("https://devtoolkit.ink")
img.save("devtoolkit-qr.png")
# Node.js (qrcode library)
const QRCode = require('qrcode');
await QRCode.toFile('devtoolkit-qr.png', 'https://devtoolkit.ink');
# Command line (qrencode)
qrencode -o qr.png "https://devtoolkit.ink"
A single QR code can store up to 7,089 numeric characters, 4,296 alphanumeric characters, or 2,953 bytes of binary data. In practice, keep data under 300 characters for reliable scanning.
Static QR codes (the ones DevToolKit generates) never expire — the data is encoded directly in the image. Dynamic QR codes (from some paid services) redirect through a URL that can be changed or disabled.
Yes, if you use error correction level H (30% recovery). The logo should cover no more than 30% of the QR code area. Always test scannability after adding a logo.
QR codes themselves are just data carriers — they are as safe as the content they encode. Always verify URLs before visiting them. Never scan QR codes from untrusted sources, as they could link to phishing sites.
Try QR Code Generator Now →DevToolKit — 42+ Free Online Developer Tools