Skip to content

QR Code Best Practices — Size, Color, Placement, and Testing

How-To9 min readMay 1, 2025
Table of Contents

A QR code is either reliable or it is not. There is no "usually scans." A code that fails 10% of the time in real-world conditions is a code that causes frustration, erodes trust in your brand, and loses conversions. The difference between a reliable QR code and an unreliable one comes down to a small set of measurable, controllable decisions.

This guide is a practical checklist for every decision that affects QR code scan reliability: error correction level, minimum size for the print context, contrast ratio, quiet zone, URL length, file format for export, and testing protocol before committing to a print run. Follow these guidelines and your QR codes will scan reliably across modern devices and reasonable real-world conditions.

Error Correction: Choose Before You Design

Error correction level determines how much of the QR pattern can be damaged or obscured before the code fails to scan. Choose it before finalizing the design because it affects the code's density and therefore the minimum reliable size.

The four levels:

  • L (Low) — 7% recovery: For pristine digital environments only. Clean screen display, PDF, or email. Never use for print that will be handled.
  • M (Medium) — 15% recovery: Good default for most print applications without a logo.
  • Q (Quartile) — 25% recovery: For print materials in light industrial settings or where occasional surface damage is expected.
  • H (High) — 30% recovery: Required when embedding a logo in the center of the QR. Use for all outdoor applications and any print that will be handled repeatedly.

Rule of thumb: When in doubt, use H for print and M for digital. The density difference is small; the reliability difference is significant.

Minimum Print Sizes by Context

QR code size is the most frequent cause of scan failures in the field. The minimum size depends on the expected scan distance and the density of the code.

ContextMinimum sizeRecommended size
Business card2cm × 2cm2.5cm × 2.5cm
Product packaging (small)2cm × 2cm2.5cm × 2.5cm
Restaurant table tent3cm × 3cm4cm × 4cm
Retail shelf display3cm × 3cm5cm × 5cm
Poster (scanned at arm's length)3cm × 3cm5cm × 5cm
Window signage (scanned from 1m)6cm × 6cm10cm × 10cm
Outdoor banner (scanned from 2m)15cm × 15cm25cm × 25cm

The 10× rule: For any context where you know the expected scan distance, the QR code should be at least 1/10 of that distance in physical size. 1 meter scan distance = 10cm minimum QR size.

For short URLs: A shorter URL creates a less dense QR pattern that scans reliably at a smaller physical size. Shorten URLs to under 50 characters before encoding for the smallest reliable size.

Color and Contrast Rules

QR code scanners detect contrast between the dark modules and the light background. Insufficient contrast causes scan failures, especially in variable lighting conditions.

Minimum contrast ratio: 3:1 between foreground (module) color and background. WCAG AA text contrast for reference is also 4.5:1 — the QR standard is slightly more permissive, but higher contrast is always better.

Dark-on-light vs light-on-dark: Dark modules on a white/light background scan fastest and most reliably. Light modules on a dark background work on modern devices but can fail on older cameras and in bright lighting conditions. If using an inverted (light on dark) QR code, increase the error correction level to H.

Colored QR codes: Using a brand color for the modules works if the contrast ratio with the background is at least 3:1. Test with an actual phone — your monitor's color calibration may make the contrast look higher than it is.

What to avoid:

  • Gradient backgrounds behind the QR code
  • Photo or texture backgrounds within the quiet zone
  • Module color and background color that are close in luminance (both medium-brightness)
  • Semi-transparent QR codes overlaid on content

Test: Take a photo of the printed QR code under the worst expected lighting condition (dim indoor light, or bright direct sun outdoors) and verify it scans. This is more reliable than testing under ideal conditions.

The Quiet Zone: Do Not Crop It

The quiet zone is the white (or background-colored) border around all four edges of the QR code. It is not decorative — it is a functional part of the code. Scanners use it to detect where the QR pattern begins and ends.

Required quiet zone: A minimum of 4 module widths on all four sides. The module width depends on the QR version — for a typical URL QR at business card size, 4 modules is roughly 2–3mm.

How quiet zone failures happen in design:

1. The QR image is placed in a design and the designer crops or masks the edges to fit a space

2. A design element (text, line, logo, color block) overlaps the edge of the QR code

3. The QR is positioned at the physical edge of a card with a bleed, and the quiet zone is cut during trimming

Prevention: Always export the QR with the quiet zone included. In the layout, ensure there is at least 3mm of clear space between the QR pattern's quiet zone edge and any other design element. Verify that bleed and trim lines do not intersect the quiet zone.

File Formats: SVG for Print, PNG for Digital

The file format you download matters for print quality.

SVG (Scalable Vector Graphics): Vector format. Scales to any size without pixelation. Recommended for all print applications. Import into Illustrator, InDesign, Canva, Figma, or any print design software. When printed at 300–600 DPI, each module has perfectly sharp edges.

PNG: Raster format. Fixed pixel dimensions. Prints cleanly if the pixel dimensions are large enough relative to the print size. At 300 DPI, a 600×600 pixel PNG prints cleanly at 2 inches (5cm) square. A 200×200 pixel PNG at the same size will be blurry. Always download at the largest pixel size offered.

PDF: Some generators export QR codes as PDFs containing embedded vector graphics. This is equivalent to SVG for print purposes.

JPEG: Never use JPEG for QR codes. JPEG compression introduces artifacts at the sharp edges of QR modules — even at high quality settings — that can cause scan failures.

Rule: SVG always, PNG at maximum resolution as the fallback, JPEG never.

Download your QR code as SVGSVG format for infinite-resolution print quality

Pre-Print Testing Checklist

Before committing to a print run, complete this testing protocol:

1. Scan the screen version: Before printing, scan the QR code as displayed on your monitor from a normal reading distance. It should scan in under 2 seconds. If it takes longer, identify the issue (too dense, too small, poor contrast) before printing.

2. Print a test page: Print one copy at the intended size and on the intended paper stock. Do not proof at a different size — the scan behavior at small sizes is different from large sizes.

3. Test on at least three devices: Include a recent iPhone, a recent Android, and a 2–3 year old phone (which has a less capable camera). If the 3-year-old phone fails, the code has a real-world reliability problem.

4. Test in the intended environment: If the code will be on a restaurant table, test it under typical restaurant lighting (dim to moderate indirect light). If it will be on an outdoor sign, test it in direct sunlight.

5. Verify the destination: Scan to confirm the correct destination loads, is mobile-optimized, and loads quickly on a cellular connection.

6. Test with the laminated or finished version: If the print will be laminated, apply a laminate sample and rescan. Glossy laminates can cause glare in certain lighting; matte is safer.

Frequently Asked Questions

Can I change the color of the QR code modules?
Yes. The modules (dark squares) can be any color as long as the contrast ratio with the background is at least 3:1. Dark brand colors on white or light backgrounds work well. Always test the colored QR code with a real phone scan before finalizing — contrast that looks sufficient on screen can be insufficient in print under certain lighting conditions. Inverted codes (light modules on dark background) work but scan more slowly.
How do I know if my QR code is too dense to scan reliably at its intended size?
Print a test copy at the exact intended size and scan it with an older phone (2–3 years old). If the older phone takes more than 3 seconds to scan, the code is too dense for that size. Options: make the printed size larger, shorten the URL to reduce data density, or reduce error correction level from H to M (which reduces density at the cost of some damage tolerance).
Should I include a URL label below the QR code?
A short URL label below the QR code (e.g., yourbrand.com/menu) serves two purposes: it tells users what the code leads to, which increases trust and scan rate, and it provides a manual fallback for people who choose to type rather than scan. The label increases scan rates meaningfully. Always include at minimum a brief call-to-action label like 'Scan to view menu' even without the full URL.
Can I add rounded corners or dots to QR modules for a more stylized look?
Styled QR codes with rounded corners or circular modules are generated by some premium services. They can look more visually appealing, but the non-standard module shapes can reduce scan reliability, particularly on older or lower-quality cameras. If you use a styled QR, use H-level error correction, test on multiple devices including older phones, and verify scan performance matches an equivalent standard QR code.
What is the maximum URL length I can encode in a QR code?
The theoretical maximum for a Version 40 QR code in byte mode is 2,953 bytes — roughly 2,953 characters for ASCII text. In practice, URLs longer than 200–300 characters produce QR codes dense enough to require careful sizing and error correction. Practically, keep URLs under 100 characters for reliable small-format print use. Use a URL shortener for long URLs before encoding.

Summary

QR code reliability is not mysterious — it is the result of following measurable guidelines for error correction level, minimum size, contrast, quiet zone, and file format. The checklist in this guide is comprehensive; applying even the most critical items (H-level error correction for print, 2.5cm minimum for business cards, SVG format, and pre-print testing on an older phone) will eliminate the majority of scan failures.

The best QR code is one the user scans without noticing the mechanics — they see the code, understand what it does from the label, scan it, and the destination loads immediately. Everything in this guide serves that outcome.

Try these tools

Related guides

All Guides