QR Code Generator › Guides
How big should a printed QR code be? What data length and error correction do to it
Open the tool: QR Code Generator
A QR code that scans instantly on screen can fail on a poster across the room or on a business card printed slightly blurred. Whether it scans depends mostly on one number: how many small squares, called modules, it has to fit into the space you give it. That number is decided by the amount of data and the error-correction level. We generated codes for five real-world payloads at every level with the same library our QR code generator uses and counted the modules.
Short answer: keep the content short. A 20-character web address produced a 25 × 25 grid; a 123-character tracking link needed 41 to 61 modules per side depending on the error-correction level. Fewer modules means each one can be printed larger, which is what makes a code easy to scan.
Versions, modules and error correction in one paragraph
QR codes come in 40 sizes called versions. Version 1 is 21 × 21 modules and each step adds 4 modules per side, up to 177 × 177 for version 40. A generator picks the smallest version that holds your data. Error correction adds redundant data so a code can still be read when part of it is dirty, damaged or covered: according to DENSO WAVE, the inventor of the QR code, level L can restore about 7% of the codewords, M about 15%, Q about 25% and H about 30%. More redundancy means more data to store, so a higher level can push the code into a larger version.
What we measured
Each payload was encoded as UTF-8 bytes in byte mode, letting the library choose the smallest version. The cell shows the version and the grid size in modules.
| Payload | Bytes | L (7%) | M (15%) | Q (25%) | H (30%) |
|---|---|---|---|---|---|
Short URL https://glowhalo.org | 20 | v2 · 25 | v2 · 25 | v2 · 25 | v3 · 29 |
| Wi-Fi login (network name and password) | 47 | v3 · 29 | v4 · 33 | v5 · 37 | v6 · 41 |
| Product URL with one parameter | 61 | v4 · 33 | v4 · 33 | v6 · 41 | v7 · 45 |
| Same URL with five UTM tracking tags | 123 | v6 · 41 | v8 · 49 | v9 · 53 | v11 · 61 |
| Contact card (vCard with phone, email, address) | 196 | v9 · 53 | v10 · 57 | v12 · 65 | v15 · 77 |
What the table tells you
- Data length dominates. Going from the 20-byte link to the 123-byte tracking link at level M took the grid from 25 to 49 modules per side, nearly four times as many modules. Changing error correction from M to H on the same tracking link added another 12 per side.
- Error correction is sometimes free. For the short URL, levels L, M and Q all fitted in version 2. When the data leaves spare room in a version, a higher level costs nothing, which is why a good generator lets you see the result before you choose.
- Tracking parameters are expensive. The five UTM tags doubled the data. If you need them, a short redirect link on your own domain that adds the tags on the server keeps the printed code small.
- Contact cards are large. A full vCard needed 53 to 77 modules. Putting a link to an online contact page in the code instead keeps it compact and lets you update the details later.
From modules to centimetres
The printed width of a code is the number of modules plus a quiet zone, a blank margin of 4 modules on each side that scanners need to find the edges. So a version 4 code (33 modules) needs 41 modules of width in total. Printed 2.5 cm wide, each module is about 0.6 mm. A version 11 code (61 + 8 = 69 modules) at the same width has modules of only 0.36 mm, small enough that slight ink spread or a phone camera's focus limit can make neighbouring modules blur together.
| Grid (incl. quiet zone) | Module size at 2.5 cm | Module size at 4 cm |
|---|---|---|
| 25 + 8 = 33 | 0.76 mm | 1.21 mm |
| 33 + 8 = 41 | 0.61 mm | 0.98 mm |
| 49 + 8 = 57 | 0.44 mm | 0.70 mm |
| 61 + 8 = 69 | 0.36 mm | 0.58 mm |
Many printing guides use a rough rule that the scanning distance should be no more than about ten times the code's width: a code meant to be scanned from 1 metre away should be at least 10 cm wide. Treat that as a starting point and test with an actual phone at the actual distance.
Our generator, tested from its screen
The first table on this page came from the library itself. To check what a visitor actually gets, we used our QR code generator page in Chromium 157: we pasted links of different lengths into the text box, picked each error-correction level from the menu, pressed Download SVG and counted the modules in the file, then measured the preview picture at each PNG size (the Download PNG button saves that same picture).
| Link length | Low | Medium | Quartile | High |
|---|---|---|---|---|
| 20 characters | 25 | 25 | 25 | 29 |
| 60 characters | 33 | 33 | 37 | 45 |
| 100 characters | 37 | 41 | 49 | 57 |
| 200 characters | 53 | 57 | 65 | 77 |
| 300 characters | 61 | 69 | 81 | 89 |
| 500 characters | 77 | 85 | 101 | 113 |
- The ceiling: the page accepted up to 2,953 plain letters at Low, 2,331 at Medium, 1,663 at Quartile and 1,273 at High, each producing the largest 177 × 177 code. One more letter showed the "Too much text" message. These limits match the capacity DENSO WAVE publishes for version 40 in byte mode.
- One character can change the grid: at Medium a 122-character link fit in 45 modules per side, and a 123-character link needed 49.
- Pixels per module in a PNG: a 20-character link at Medium got 7 pixels per module at the 256 px size and 31 at 1024 px. A 305-character link at High got only 2 pixels per module at 256 px and 10 at 1024 px. With 2 pixels per module, most enlargement by a printer can blur the edges, so long content should be downloaded as SVG or at 1024 px.
- The margin grows on its own: the page rounds the module size down to whole pixels, so the white border is often wider than the 4-module minimum, for example 40 px instead of 28 px for the short link at 256 px. Cropping that border away in an editor can remove the quiet zone scanners need.
You can download every value we used. Each file is plain CSV with a header row, so it opens in any spreadsheet:
- Modules per side for 12 link lengths at four levels: columns characters, L, M, Q and H.
- Longest text accepted at each level: columns level, longest_accepted_characters and modules_at_limit.
- Pixels per module in the PNG preview: columns payload, level, export_px, modules, module_px and margin_px_each_side.
Checklist before you print
- Shorten the content: a short URL, no unnecessary parameters.
- Pick error correction by environment: M for screens, flyers and cards; Q or H for outdoor signs, stickers on products, or if you plan to put a small logo in the middle (the logo covers modules that error correction must rebuild).
- Download as SVG for print. Our generator offers SVG, which stays sharp at any size; a small PNG enlarged by a print shop can blur.
- Keep the quiet zone white and keep strong contrast: dark modules on a light background. Inverted (light on dark) codes are not read by every scanner.
- Print a test copy at the final size and scan it with two different phones, in the lighting where it will be used.
- Check where the link goes on a phone that is not logged in to your accounts.
Common questions
Do QR codes expire?
A QR code is just encoded text and does not expire. Codes that "stop working" usually point to a redirect service whose subscription ended. A code that contains your own URL works as long as that URL does.
Can I put a logo in the middle?
Yes, if you raise the error-correction level and keep the logo small, so the remaining modules can still be decoded. Always test the final printed version, because a logo removes data on purpose.
Why did my code change when I only added one character?
If the extra character pushed the data past the capacity of the current version, the generator moved to the next version, which has a different grid and pattern. That is normal.
References
- DENSO WAVE: QR Code error correction feature
- DENSO WAVE: QR Code version (size) and information capacity
- ISO/IEC 18004:2024 QR Code bar code symbology specification
- qrcode-generator by Kazuhiko Arase (the library our tool uses)
Figures without a source link come from the steps shown on this page. Companion tool: QR Code Generator. Spotted an error? Write to help@glowhalo.org. “QR Code” is a registered trademark of DENSO WAVE INCORPORATED. Chromium and Wi-Fi are trademarks of their owners; GlowHalo is not affiliated with them.