QR Code Complete Guide: Create, Scan, and Use QR Codes

Β· 10 min read

How QR Codes Work

QR (Quick Response) codes were invented by Denso Wave in 1994 for tracking automotive parts. They encode data in a 2D matrix of black and white modules (squares). Unlike barcodes which store data in one dimension, QR codes use both horizontal and vertical axes, allowing much more data in a smaller space.

Every QR code contains three finder patterns (the large squares in three corners) that help scanners detect orientation and angle. The fourth corner has an alignment pattern for perspective correction. Between these patterns, data is encoded in a specific pattern of modules.

QR Code Types

TypeDataExample
URLWebsite linkhttps://dl-kit.com
TextPlain textAny string up to ~4,000 characters
WiFiNetwork credentialsWIFI:T:WPA;S:MyNetwork;P:password;;
vCardContact informationName, phone, email, address
EmailPre-filled emailmailto:[email protected]?subject=Hello
SMSPre-filled text messagesmsto:+1234567890:Hello
CalendarEvent detailsiCalendar format (VEVENT)
GeoMap locationgeo:40.7128,-74.0060

Create any type with our QR Code Generator. For WiFi sharing specifically, try WiFi QR Generator.

Error Correction Levels

QR codes use Reed-Solomon error correction, allowing them to be read even when partially damaged or obscured:

LevelRecoveryUse CaseSize Impact
L (Low)~7%Clean environments, maximum dataSmallest QR code
M (Medium)~15%General purpose (default)Moderate
Q (Quartile)~25%Outdoor use, some wear expectedLarger
H (High)~30%Logo overlay, harsh environmentsLargest QR code

Level H is essential when adding a logo to the center of a QR code β€” the logo obscures modules, and high error correction compensates.

Data Capacity

Data TypeMaximum CharactersQR Version
Numeric only7,089Version 40 (177Γ—177)
Alphanumeric4,296Version 40
Binary (UTF-8)2,953 bytesVersion 40
Kanji1,817 charactersVersion 40

In practice, keep QR code data short. A URL under 100 characters produces a small, easily scannable code. Long URLs create dense codes that are harder to scan, especially from a distance.

Common Uses

Creating QR Codes

Online Tools

Our QR Code Generator creates codes entirely in your browser β€” no data is sent to any server. Supports URL, text, WiFi, vCard, and custom colors.

Command Line (qrencode)

# Install
sudo apt install qrencode  # Linux
brew install qrencode       # macOS

# Generate PNG
qrencode -o qr.png "https://dl-kit.com"

# Generate SVG (scalable)
qrencode -t SVG -o qr.svg "https://dl-kit.com"

# WiFi QR code
qrencode -o wifi.png "WIFI:T:WPA;S:NetworkName;P:password;;"

# Set error correction level
qrencode -l H -o qr.png "https://dl-kit.com"

# Set size (module size in pixels)
qrencode -s 10 -o qr.png "https://dl-kit.com"

Python (qrcode library)

import qrcode

# Basic QR code
img = qrcode.make("https://dl-kit.com")
img.save("qr.png")

# Customized
qr = qrcode.QRCode(
    version=1,
    error_correction=qrcode.constants.ERROR_CORRECT_H,
    box_size=10,
    border=4,
)
qr.add_data("https://dl-kit.com")
qr.make(fit=True)
img = qr.make_image(fill_color="black", back_color="white")
img.save("qr_custom.png")

Scanning QR Codes

Most smartphone cameras now scan QR codes natively β€” just point the camera at the code. For scanning from image files, use our QR Code Reader.

Scanning Tips

Design Best Practices

  1. Minimum size β€” 2Γ—2 cm for close-range scanning. For distance: 10 cm per 1 meter of scanning distance.
  2. Quiet zone β€” Leave a white border of at least 4 modules around the QR code. Without it, scanners may fail.
  3. Contrast β€” Dark modules on light background. Minimum 40% contrast difference. Avoid low-contrast color combinations.
  4. Colors β€” Dark foreground, light background (not inverted). Red/green combinations are problematic for color-blind users.
  5. Logo placement β€” Center only, use error correction level H, keep logo under 20% of QR code area.
  6. Test before printing β€” Scan with at least 3 different devices/apps before mass printing.
  7. Use short URLs β€” Shorter data = simpler QR code = easier to scan.

Frequently Asked Questions

How much data can a QR code hold?

Maximum: 7,089 numeric characters, 4,296 alphanumeric, or 2,953 bytes of binary data. For URLs, practical limit is about 2,000 characters, but shorter is better for scannability.

Do QR codes expire?

Static QR codes never expire β€” the data is encoded directly in the pattern. Dynamic QR codes (which redirect through a URL shortening service) can expire if the service stops or the link is deactivated.

Can QR codes be customized with colors and logos?

Yes, thanks to error correction. With level H (30% recovery), up to 30% of the QR code can be obscured by a logo and still scan correctly. Use dark foreground on light background for best results.

Are QR codes secure?

QR codes are just data carriers β€” they are not inherently secure or insecure. The risk is in what they link to. Always check the URL before visiting. Malicious QR codes can link to phishing sites or trigger unwanted actions.

What is the minimum size for a printed QR code?

Minimum 2Γ—2 cm (0.8Γ—0.8 inches) for close-range scanning (within 30 cm). For posters or signs, use a 10:1 ratio: 10 cm of QR code size per 1 meter of expected scanning distance.

Related Tools

QR Generator QR Reader WiFi QR Barcode Generator