💻 Text & Dev
📱 📱 QR Code Generator: How QR Codes Work and What They Store
Learn how QR codes work, what data they store, and how to create them. Covers the structure of QR codes, error correction, static vs dynamic codes, and best use cases.
⏱️ 8 min read🦉 365tool.net🌍 For everyone worldwide
QR codes are everywhere — on restaurant menus, product packaging, business cards, payment terminals, and billboard advertisements. Invented in 1994 by Masahiro Hara at Denso Wave for tracking automotive parts in Japan, QR codes have become the dominant bridge between physical objects and digital content. Understanding how they work makes you a smarter creator and user of them.
What is a QR Code?
QR stands for "Quick Response." A QR code is a two-dimensional matrix barcode that encodes data as a grid of black and white squares (modules). Unlike a standard 1D barcode that only holds a dozen or so digits, a QR code can store up to 7,089 numeric characters or 4,296 alphanumeric characters — and remains readable even when partially damaged.
The Structure of a QR Code
Every QR code contains several distinct functional areas:
- Finder patterns: The three large square patterns in the corners (top-left, top-right, bottom-left). They allow scanners to locate and orient the code from any angle.
- Alignment patterns: Smaller squares inside larger QR codes that help scanners correct for distortion (like when a code is printed on a curved surface).
- Timing patterns: Alternating black-and-white rows/columns connecting the finder patterns, helping scanners determine module size and position.
- Format information: Strips of modules storing the error correction level and mask pattern used — read first before decoding the data.
- Data modules: The bulk of the QR code — the actual encoded information stored as binary patterns.
- Quiet zone: The white margin around the code that separates it from background content and is required for reliable scanning.
How QR Codes Encode Data
Data is encoded using four possible modes, chosen based on what's most efficient for the content:
- Numeric mode: Digits 0–9 only; most compact (3.33 bits per character). Used for phone numbers and serial numbers.
- Alphanumeric mode: Uppercase letters, digits, and 9 special characters; 5.5 bits per character. For uppercase-only URLs.
- Byte mode: Full 8-bit ASCII; 8 bits per character. Most modern URLs use byte mode (handles lowercase and special characters).
- Kanji mode: Japanese characters; 13 bits per character. For Japanese content using Shift JIS encoding.
Error Correction: Why Damaged QR Codes Still Scan
QR codes use Reed-Solomon error correction — the same algorithm used in CDs and DVDs — which adds redundant data so the original information can be reconstructed even if part of the code is damaged, dirty, or obscured.
Four error correction levels:
| Level |
Recovery Capability |
Best For |
| L (Low) | ~7% damage | Clean environments; maximum data capacity |
| M (Medium) | ~15% damage | Most general use cases |
| Q (Quartile) | ~25% damage | Industrial environments; outdoor use |
| H (High) | ~30% damage | Codes with embedded logos; harsh conditions |
When you add a logo to the center of a QR code, it works because the logo occupies the region normally covered by error correction data — as long as the logo covers less than 30% of the code area and error correction level H is used, the code remains scannable.
Static vs. Dynamic QR Codes
Static QR Codes
The data is encoded directly into the QR pattern. Once created, the destination cannot be changed without creating a new code. Static codes never expire and work without internet. Best for: permanent content like Wi-Fi passwords, contact cards, fixed text messages.
Dynamic QR Codes
Instead of encoding the full URL, a dynamic code encodes a short redirect URL. The actual destination is stored in the cloud and can be changed at any time without reprinting. Dynamic codes also enable scan analytics (location, device type, time of scan). Best for: marketing campaigns, menus that change frequently, any content that might need updating.
QR Code Versions and Capacity
QR codes come in 40 versions (defined by ISO/IEC 18004). Version 1 is a 21×21 grid holding 41 numeric characters. Version 40 is a 177×177 grid holding 7,089 numeric characters. Each version step adds 4 modules per side. The generator automatically selects the smallest version that fits your data at your chosen error correction level.
Common QR Code Types and Content
- URL QR code: Most common; encodes a website address directly or as a redirect
- Wi-Fi QR code: Format: WIFI:S:<SSID>;T:<WPA>;P:<password>;; — lets devices join a network without typing the password
- vCard QR code: Encodes contact information (name, phone, email, address) in a standard format importable to contacts apps
- SMS/email QR code: Opens a pre-addressed message for the user to send
- Plain text QR code: Displays text on screen — works offline, no internet needed
- Payment QR code: Used by PayPal, Venmo, UPI, and other payment platforms
Best Practices for Creating QR Codes
- Test before printing: Always scan your QR code on multiple devices before mass printing — small errors that pass one scanner may fail another
- Minimum size: 2.5 cm × 2.5 cm (1 inch) for printing; larger for outdoor or longer-distance scanning
- High contrast: Dark modules on light background gives best scan reliability. Never use low-contrast color combinations.
- Use vector formats (SVG/PDF) for print to prevent pixelation when scaled up
- Include a quiet zone: At least 4 modules of clear space around the code on all sides
- Keep URLs short: Shorter URLs = smaller, simpler QR codes that are easier to scan
❓ Frequently Asked Questions
How does a QR code work?▼
A QR code encodes data (usually a URL or text) as a pattern of black and white squares using Reed-Solomon error correction. When a camera scans it, the scanner locates the three corner finder patterns to orient itself, reads the format information, then decodes the data modules. The entire process takes under 100 milliseconds.
What is the difference between static and dynamic QR codes?▼
Static QR codes embed data directly in the pattern — they work offline and never expire, but cannot be changed after creation. Dynamic QR codes encode a short redirect URL; the actual destination is stored in the cloud and can be updated without reprinting. Dynamic codes also offer scan analytics (location, time, device type).
Why can QR codes still scan when partially damaged?▼
QR codes use Reed-Solomon error correction, which adds redundant data that allows the original information to be reconstructed even if up to 30% of the code is damaged (at error correction level H). This is the same algorithm used in CDs and DVDs to recover data from scratches.
Can I put a logo in a QR code?▼
Yes. Because QR codes include error correction data, covering part of the code with a logo still allows it to scan — as long as the logo covers less than 30% of the code area and you use error correction level H. The "missing" data is reconstructed from the error correction information.
What file format should I download a QR code in?▼
For digital use (websites, email, presentations): PNG is ideal — transparent background support and lossless compression. For print: SVG or PDF, as vector formats scale to any size without pixelation. Never use JPG for QR codes — lossy compression can corrupt the fine patterns and cause scanning failures.