Initializing, please wait a moment

QR Code Generator - Best Practices

Last reviewed 2026-04-27. Open the QR code generator to create codes in your browser without sending the payload anywhere.

30-second answer. A QR code that always scans depends on five settings. Error correction at level M or higher (lets the code survive light damage). High contrast (black on white, no light gradients). Minimum 2 cm physical size (smaller fails on phone cameras). Quiet zone of at least four modules around the edge. And a short payload - long URLs produce dense, hard-to-scan codes; use a URL shortener first.

Error correction - the most-skipped setting

QR codes have four error-correction levels. They tell the encoder how much of the code can be damaged or obscured before scanning fails:

  • L (Low). Recovers up to ~7% damage. Smallest code, least robust. Right only when the code is on a screen and will not get scuffed.
  • M (Medium). Recovers ~15% damage. The default in most generators. Good for most printed contexts.
  • Q (Quartile). Recovers ~25% damage. Right when the code might overlap a logo or get partially covered.
  • H (High). Recovers ~30% damage. The right pick for codes printed on outdoor signage, on packaging, or anywhere wear is expected.

The trade-off: higher error correction makes the code denser (more black-and-white squares per area) for the same payload. Pick the lowest level your environment tolerates.

Contrast and color

The standard is dark-foreground on light-background. Black on white scans best. Inverted (light on dark) often fails because phone camera scanners assume the standard polarity.

Custom colors work if the contrast ratio stays above 4:1 - a dark blue on white is fine, a medium gray on white is not. Light-on-dark is unreliable; never use white-on-black QR for printed materials. Gradient backgrounds break scanning entirely; the code area must be a single solid color.

Physical size and quiet zone

The minimum scannable size depends on distance. Rule of thumb: the code's side length should be at least 1/10 the scanning distance. A code scanned from 30 cm (a phone in hand) needs to be at least 3 cm. A code scanned from 3 m (a poster) needs to be at least 30 cm.

The quiet zone is the white space around the code. The QR specification requires at least four modules (the small squares) of margin on all four sides. Putting the code flush against text, a border, or another graphic causes scanners to fail even though the code itself is intact.

Payload length matters more than you think

A QR code's density grows with payload size. Encoding a 10-character URL produces a sparse code that scans from a meter away. Encoding a 200-character URL with tracking parameters produces a dense code that needs to be larger physically and scans from closer.

Always shorten the URL first. example.com/p is better than example.com/products/winter-collection?utm_source=poster&utm_campaign=2026-q1. The redirect can carry the tracking parameters server-side; the QR carries only the short link. The result is a smaller, more reliable code.

Test before you print

Print the code at the size you plan to use, scan it from the distance and angle you expect, and try at least two phones - one new, one a few years old. A code that scans from 5 cm but fails from 50 cm is the wrong size. The QR code generator previews the code at multiple sizes before download. For more on browser tools and privacy, see free online tools - no upload required.

← Back to All Guides

Why trust these tools

  • Ten-plus years of web tooling. The freetoolonline editorial team has shipped browser-based utilities since 2015. The goal has never changed: get you to a working output fast, without an install.
  • Truly in-browser - no upload. Every file-processing tool on this site runs in your browser through modern Web APIs (File, FileReader, Canvas, Web Audio, WebGL, Web Workers). Your photo, PDF, audio, or text never leaves your device.
  • No tracking during tool use. Analytics ends at the page view. The actual input you paste, drop, or capture is never sent to any server and never written to any log.
  • Open-source core components. The processing engines underneath (libheif, libde265, pdf-lib, terser, clean-css, ffmpeg.wasm, and others) are public and audit-able. We link to each one in its tool page's footer.
  • Free, with or without ads. All tools are fully functional without sign-up. The Disable Ads button in the header is always available if you need a distraction-free run.