How Much Data Can a QR Code Store?
QR codes are everywhere — on product packaging, business cards, restaurant menus, advertisements, and digital payment systems. Despite their ubiquity, many people do not realize that QR codes come in 40 different versions with varying data capacities depending on the version, error correction level, and the type of data being encoded. Understanding these limits helps you design QR codes that work reliably across scanning conditions while fitting the required information. This guide provides a comprehensive breakdown of QR code data capacity with practical examples and guidelines.
QR Code Structure Basics
A QR code consists of black modules arranged in a square grid on a white background. The minimum size is version 1, which uses a 21x21 module grid. Each successive version adds 4 modules per side, up to version 40 at 177x177 modules. The data stored in a QR code is encoded using Reed-Solomon error correction, which adds redundant information that allows the code to be read even if part of it is damaged or obscured. The amount of data that can be stored depends on how much space is allocated to error correction versus raw data.
By Data Type
QR codes can encode four different data types, each with a different maximum capacity at version 40 with the lowest error correction level:
| Data Type | Maximum Characters | Example |
|---|---|---|
| Numeric | 7,089 | Phone numbers, ZIP codes |
| Alphanumeric | 4,296 | URLs, product codes |
| Binary (bytes) | 2,953 | Encrypted data, small images |
| Kanji/Kana | 1,817 | Japanese characters (Shift JIS) |
Numeric Mode
Numeric mode is the most space-efficient encoding, storing approximately 3.3 bits per character. It can only encode digits 0 through 9, making it ideal for telephone numbers, account numbers, ZIP codes, serial numbers, and barcode-style identifiers. For example, a 10-digit phone number like 5551234567 takes up very little space in numeric mode, allowing it to fit even on the smallest QR code versions with high error correction.
Alphanumeric Mode
Alphanumeric mode encodes digits 0-9, uppercase letters A-Z, and nine special characters: space, $, %, *, +, -, ., /, and :. This is the most commonly used mode because URLs — the most frequent QR code content — consist entirely of uppercase-safe characters and symbols. Each character stores approximately 5.5 bits, making it about 40 percent less efficient than numeric mode.
Binary Mode
Binary mode encodes any byte value from 0x00 to 0xFF, making it suitable for arbitrary data including encrypted content, compressed text, small executable code, or image thumbnails. Each byte occupies exactly 8 bits, so the raw storage is straightforward to calculate. Note that some binary sequences may cause encoding issues with certain QR code readers, so Base64 encoding the binary data before creating the QR code is a common practice.
Kanji Mode
Kanji mode efficiently encodes Japanese characters using Shift JIS encoding with 13 bits per character instead of the 16 bits required by UTF-8. This makes it significantly more efficient for Japanese text than binary mode. Each character represents a full Kanji ideograph, so a QR code in Kanji mode can store roughly 1,800 characters of Japanese text.
By Version and Error Correction
The QR code standard defines 40 versions. Each version increases the module count by 4 per side, expanding the available data capacity. The error correction level further reduces usable capacity based on the desired robustness.
| Version | Modules | Numeric (L) | Numeric (H) | Alphanum (L) | Alphanum (H) | Binary (L) | Binary (H) |
|---|---|---|---|---|---|---|---|
| 1 | 21x21 | 41 | 17 | 25 | 10 | 17 | 7 |
| 2 | 25x25 | 77 | 34 | 47 | 20 | 32 | 14 |
| 3 | 29x29 | 127 | 58 | 77 | 35 | 53 | 24 |
| 4 | 33x33 | 187 | 82 | 114 | 50 | 78 | 34 |
| 5 | 37x37 | 255 | 106 | 154 | 64 | 106 | 44 |
| 6 | 41x41 | 322 | 139 | 195 | 84 | 134 | 58 |
| 7 | 45x45 | 370 | 154 | 224 | 93 | 154 | 64 |
| 8 | 49x49 | 461 | 202 | 279 | 122 | 192 | 84 |
| 9 | 53x53 | 552 | 235 | 335 | 143 | 230 | 98 |
| 10 | 57x57 | 652 | 288 | 395 | 174 | 271 | 119 |
| 20 | 97x97 | 2,335 | 1,090 | 1,291 | 603 | 899 | 419 |
| 30 | 137x137 | 4,773 | 2,243 | 2,626 | 1,234 | 1,837 | 862 |
| 40 | 177x177 | 7,089 | 3,613 | 4,296 | 2,173 | 2,953 | 1,506 |
Error Correction Levels Explained
QR codes offer four error correction levels that determine how much of the code can be damaged while remaining readable:
| Level | Recovery Capacity | Typical Use Case |
|---|---|---|
| L (Low) | 7% | Clean environments, high-density data |
| M (Medium) | 15% | General purpose, recommended default |
| Q (Quartile) | 25% | Outdoor use, slightly dirty codes |
| H (High) | 30% | Industrial environments, small codes |
L — Low (7 percent recovery)
Maximum data capacity, but minimal damage tolerance. Use this only when the QR code will be printed on clean surfaces in controlled environments, such as digital screens, clean product packaging, or well-maintained labels. The scanning distance and angle must be optimal because any significant damage will render the code unreadable.
M — Medium (15 percent recovery)
This is the recommended default for most applications. It provides a good balance between data capacity and damage tolerance. A QR code with medium error correction can withstand small scratches, moderate dirt, and slight printing imperfections while still scanning reliably.
Q — Quartile (25 percent recovery)
Use this level for QR codes printed on surfaces that may become dirty or damaged, such as outdoor signage, restaurant tables, or shipping labels. The higher redundancy ensures reliable scanning even when the code is partially obscured by dirt, grease, or minor physical damage.
H — High (30 percent recovery)
The highest error correction level, suitable for harsh environments where the QR code is likely to sustain significant damage. Use H level for codes printed on industrial equipment, warehouse floors, or any surface subject to wear and tear. The trade-off is substantially reduced data capacity — at version 40, H level stores only about half the data of L level.
Practical Capacity Examples
URLs
A typical website URL ranges from 20 to 100 characters. Even at version 1 with H error correction (10 alphanumeric characters), most URLs will not fit. At version 2 with H level (20 alphanumeric characters), short URLs using a link shortener will work. For full-length URLs, version 3 or 4 with M error correction is recommended.
Contact Information (vCard)
A standard vCard with name, phone number, email, and address typically requires 200 to 400 characters of alphanumeric data. This fits comfortably in version 5 to 7 with M error correction, or version 3 with L error correction.
Wi-Fi Configuration
Wi-Fi QR codes encode network credentials in a compact format like WIFI:T:WPA;S:NetworkName;P:password;;. Typical values range from 30 to 80 characters, fitting easily in version 2 or 3 with H error correction.
Payment Information
QR code payments (such as QRIS, UPI, or WeChat Pay) use compact payloads of 50 to 200 bytes, usually fitting in version 3 to 5 with medium to high error correction for reliable point-of-sale scanning.
Practical Guidelines for Choosing QR Code Settings
- Start with the data — determine the exact content and count the characters
- Choose the data type — use numeric mode if your data contains only digits, alphanumeric mode for URLs, and binary mode for any other content
- Assess the environment — clean indoor printing can use M error correction; outdoor or industrial use needs Q or H
- Select the minimum version — pick the smallest version that fits your data with the chosen error correction level
- Test the code — print a sample at your intended size and test scanning from realistic distances and angles
Minimum Code Size Guidelines
The physical size of a QR code depends on both the version and the scanning distance. As a general rule, the printed module size should be at least 0.025 times the scanning distance. For example, if a code will be scanned from 30 cm away, each module should be at least 7.5 mm, making the total code size at least 15.75 cm for a version 1 code (21 modules x 7.5 mm). For a version 40 code, the minimum size would be 177 x 7.5 mm = 133 cm. This is why QR codes on billboards are very large even though they typically encode short URLs.
Frequently Asked Questions
Can a QR code store an image? Technically yes, but practical limits make it infeasible. A version 40 QR code with L error correction can store only 2,953 bytes of binary data, which is enough for a very small (about 50x50 pixel) icon-quality image. For any useful image resolution, the data would far exceed QR code capacity.
What happens if a QR code has too much data? The QR code generator will automatically select a higher version if one is available. If even version 40 is insufficient, the generator will report an error. In that case, reduce the data size, use a link shortener, or increase the error correction level.
Does QR code color matter for capacity? No, color does not affect capacity. The QR code standard requires high contrast between modules and background, typically black on white. While colored QR codes exist, they must maintain sufficient contrast for the scanner to distinguish modules. The data capacity is determined solely by version, error correction, and data type.
Can I put a logo in a QR code without losing data? Yes, placing a logo in the center of a QR code effectively damages that portion of the code. As long as the damaged area does not exceed the error correction capacity of the chosen level, the code will still scan. Use H or Q error correction with a version larger than the minimum required for your data to accommodate a central logo.
Use the QR Code Generator tool to create QR codes optimized for your specific data and use case. The tool automatically selects the appropriate version and error correction level based on your input.