How Big Should a QR Code Be? Size and Contrast Guide
Minimum QR code size by scan distance and content, plus the contrast, quiet zone and error-correction rules, with the formulas QRdx's tools use.
On this page
Short answer: a QR code holding a short link, scanned from about 25 cm (10 inches), needs to be about 2.5 cm (1 inch) wide, plus a blank margin. Every extra meter of scanning distance needs about 10 cm more width, and codes that hold more data need more again. Whatever the distance, don't let a single module (one of the small squares) get smaller than 0.4 mm.
The rest of this guide explains where those numbers come from and the other three things that decide whether a printed code scans: contrast, the quiet zone and error correction. Each section uses the same formulas as QRdx's print size calculator and the scan score in the playground, so you can check any design yourself.
QR code size chart
The table gives the printed width of the code itself (edge to edge, without the margin). Columns are the code's size in modules, which depends on what it holds (next section).
| Scan distance | 25 × 25 (short link) | 29 × 29 (typical URL) | 33 × 33 (Wi-Fi login) | 49 × 49 (long URL) |
|---|---|---|---|---|
| 25 cm (phone in hand) | 2.5 cm | 2.9 cm | 3.3 cm | 4.9 cm |
| 50 cm (table, counter) | 5 cm | 5.8 cm | 6.6 cm | 9.8 cm |
| 1 m (shelf, wall at arm's length) | 10 cm | 11.6 cm | 13.2 cm | 19.6 cm |
| 2 m (poster, window) | 20 cm | 23.2 cm | 26.4 cm | 39.2 cm |
| 5 m (across a room, a sign) | 50 cm | 58 cm | 66 cm | 98 cm |
Add the quiet zone, 4 modules on every side, when you lay out the page. For a 29-module code that's 8 extra modules across, so a 5.8 cm code needs 7.4 cm of clear space.
The calculator works like this:
- Module size = scanning distance ÷ 250, but never less than 0.4 mm.
- Code width = module size × modules per side.
- Space on the page = module size × (modules per side + 8).
The 250 comes from the usual "10 to 1" rule of thumb: a code scans from about ten times its width. That rule holds for a simple 25 × 25 code, so the calculator treats it as describing one, and scales up for denser codes. A 49 × 49 code at the same distance needs nearly twice the width. You can read the code in lib/print-size.ts.
What decides the module count
A QR code's size in modules is set by its version, from 1 to 40, where version n is 17 + 4n modules wide. The encoder picks the smallest version that holds your content at the chosen error-correction level. So the same distance can need very different prints:
| Content | Characters | Version at level Q | Modules |
|---|---|---|---|
https://qrdx.dev | 16 | 2 | 25 × 25 |
A dynamic short link, https://qrdx.dev/q/aB3dE5f | 26 | 3 | 29 × 29 |
A café's Wi-Fi login (WIFI:T:WPA;S:…;P:…;;) | 41 | 4 | 33 × 33 |
| A 108-character URL with tracking parameters | 108 | 8 | 49 × 49 |
| A short vCard (name, company, phone, email, website) | 140 | 10 | 57 × 57 |
These come from the capacity tables in ISO/IEC 18004, the QR code standard, which is what the calculator and the QRdx encoder both use. The lesson is simple: shorter content gives a smaller code. Trim tracking parameters you don't need, or use a dynamic code whose short link stays short whatever the destination.
Error correction: more redundancy, more modules
QR codes carry Reed–Solomon error correction at one of four levels. Each recovers roughly this share of the data if part of the code is damaged, dirty or covered:
| Level | Recovers about | Use it for |
|---|---|---|
| L | 7% | Clean screens and small labels where every module counts |
| M | 15% | General print |
| Q | 25% | QRdx's default; print that may get scuffed |
| H | 30% | Codes with a logo, outdoor signs |
Higher levels cost space. That menu URL from the table above, https://example-cafe.com/menu, is 25 × 25 at level L but 33 × 33 at level H, so at H it must be printed a third wider to scan from the same distance.
A logo hides modules, so it spends part of that budget. QRdx's scan score passes a logo when it covers no more than half of what the level can recover: up to about 15% of the code's area at level H, or 12.5% at Q. Above that it takes 10 points off, and 25 once the logo uses more than 80% of the budget.
Contrast: dark on light, at least 4.5 to 1
Cameras read QR codes by telling dark modules from light ones, so contrast matters more than color. QRdx measures it with the same formula as the WCAG contrast ratio, (L1 + 0.05) / (L2 + 0.05), using each color's relative luminance, and checks the worst pair of code and background colors:
- 4.5:1 or more passes. Black on white is 21:1.
- Below 4.5:1 loses 10 points; below 3:1, 30 points.
- Below 1.5:1 fails outright, whatever else is right.
- Light modules on a dark background lose another 10 points, because some scanner apps can't read inverted codes.
Gradients are checked stop by stop, so a gradient that fades to a pale color at one corner is judged by its palest point. A transparent background is assumed to be printed on white paper; if it will go on a dark or patterned surface, give the code its own light background.
The quiet zone
The quiet zone is the blank border around the code. The standard asks for 4 modules on every side, and scanners use it to find where the code starts. The scan score treats 4 modules or more as ideal, 1.5 to 4 as acceptable, and less than 1.5 as a failure, because a code printed flush against other artwork often won't scan at all.
QRdx downloads have no margin unless you turn on the quiet zone, so that designers can place codes precisely. If you leave it off, leave the space in your layout instead. A frame around the code also keeps a light gap, and the score counts it.
How QRdx's scan score works
The playground grades every design as you edit it, from 0 to 100. Under the hood it:
- Renders your code at 96, 160 and 320 pixels wide, standing in for small print, a typical phone distance and close up.
- Degrades each render the way a phone camera does: 30% contrast loss and a blur of about a quarter of a module.
- Tries to decode each size three times, at 90%, 100% and 110% scale. Two successes count as a pass, one as fragile.
- Subtracts points for each problem: up to 15, 20 and 45 points for failing the small, medium and large sizes (half for fragile), plus the contrast, logo and quiet zone checks above, 40 points for curly corner eyes and 20 for circle eyes (both trip up strict decoders), and 10 for a known-weak combination of shapes.
A score of 85 or more grades great, 65 or more ok, and anything lower risky. If the code fails at the largest size or the contrast is under 1.5:1, it fails and the score is capped at 30. The source is on GitHub.
It's a heuristic: lighting, lenses and scanner apps vary. Treat a great score as "very likely fine" and still test the printed proof. For codes you already have as images, the scan checker decodes the file and runs similar checks, including whether the image has at least 2 pixels per module.
A print checklist
- Measure the real distance. The furthest point someone will scan from, not the nearest.
- Shorten the content before you make the code bigger.
- Export vector. SVG, EPS or PDF stay sharp at any size. For PNG, export at least 300 pixels per inch of printed width: a 2.5 cm code needs 296 pixels, a 10 cm code 1,182. QRdx's download options cover all four formats.
- Keep dark on light and at least 4.5:1 contrast.
- Leave the quiet zone or add a frame.
- Use level H if the code carries a logo or will live outdoors.
- Prefer matte stock. Gloss and lamination reflect light straight back into the camera.
- Test the proof with two or three different phones at the real distance and lighting.
FAQ
What is the minimum size for a QR code?
For a short link scanned from a phone held in hand, about 2 to 2.5 cm (0.8 to 1 inch). Below that, modules approach the 0.4 mm floor where printers and cameras start losing them.
What is the 10 to 1 rule for QR codes?
A rule of thumb that a code can be scanned from about ten times its width: a 10 cm code from about 1 m. It assumes a simple code; denser codes need a larger print, which is what the calculator adjusts for.
Does a logo make a QR code bigger?
A logo doesn't change the module count, but it hides modules, so you should raise error correction to level H, and that does add modules. Keep the logo under about 15% of the code's area.
Can a QR code be too big?
Rarely in practice. The limit is the camera's field of view: someone standing close to a very large code may not fit all of it in frame. Size for the furthest distance and give people room to step back.
Do colored QR codes scan?
Yes, if the modules are dark, the background is light and the contrast is at least 4.5:1. Brand colors usually work for the modules; pale or neon ones usually don't.