QR codes (Quick Response codes) are two-dimensional barcodes that can store URLs, text, contact information, Wi-Fi credentials, and more. Unlike traditional barcodes that only encode numbers along a single horizontal line, QR codes use a grid of black and white squares to encode data in both dimensions, allowing them to hold significantly more information in a compact space. This guide explains how QR codes work, what they can encode, and practical tips for creating effective ones.
How QR Codes Work
A QR code encodes data as a pattern of modules (black and white squares) arranged in a grid. The code includes:
- Finder patterns: The three square markers in three corners that help scanners identify the code's orientation and location.
- Timing patterns: Alternating black and white modules that help the scanner calculate module sizes.
- Data modules: The remaining squares that encode the actual content.
- Error correction modules: Redundant data that allows the code to be read even if part of it is obscured or damaged.
Error Correction Levels
QR codes have four error correction levels that determine how much of the code can be damaged while still remaining scannable:
- L (Low): Recovers up to 7% of data. Produces the smallest code. Use for clean digital environments.
- M (Medium): Recovers up to 15% of data. The default for most generators. Good balance for most uses.
- Q (Quartile): Recovers up to 25% of data. Better for codes that may get slightly dirty or worn.
- H (High): Recovers up to 30% of data. Best for physical environments — stickers, merchandise, outdoor signage. Also allows you to overlay a logo without breaking scannability.
What QR Codes Can Encode
- URLs: The most common use — encoding a website address so users can open it by scanning.
- Plain text: Any short text message or content.
- Email addresses: Scanning opens a new email pre-addressed to the recipient.
- Phone numbers: Scanning opens the phone dialler with the number pre-filled.
- Wi-Fi credentials: Scanning automatically connects the device to a network without typing the password.
- vCard contact information: Scanning adds a contact card to the phone's address book.
Best Practices for Creating QR Codes
- Use short URLs. Longer data creates more complex, denser codes that are harder to scan. Use a URL shortener before encoding a long address.
- Use PNG format for digital, SVG for print. PNG works well for web and screen display. SVG (vector format) scales to any print size without pixelation.
- Test before distributing. Always scan your own QR code with at least two different devices before printing or publishing it.
- Maintain contrast. Black on white produces the most reliable scans. Avoid placing QR codes on busy backgrounds or using low-contrast colour combinations.
- Size matters for print. A minimum of 2cm × 2cm is recommended for codes that will be scanned at arm's length. Larger codes for larger scanning distances.
Generate your QR code using the QR Code Generator — it runs entirely in your browser and lets you download the result in PNG format for immediate use.