Initializing, please wait a moment

QR Code Generator - Best Practices

Last reviewed 2026-06-16. 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 fault-tolerant. 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.

Adding a center logo

The QR code generator can place a logo in the center of the code. Pick an image from your device and it sits on a small white backing in the middle; the image is read in your browser and is never uploaded. When you add a logo the tool raises error correction to High automatically, so the squares the logo covers can still be reconstructed.

Keep the logo small - the tool sizes it to about a fifth of the code width, which a High-correction code tolerates. A bigger logo can still break scanning, so generate the code and scan the final image from the distance you expect before you print or publish it. You can also set the foreground and background colors to match a brand, as long as the contrast stays high.

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.
  • No install, no sign-up. Open a tool and get a working output in seconds - nothing to download and no account to create. Tools that need heavy processing run it on our service, so even a low-powered machine gets the job done.
  • Analytics stops at the page view. We measure which pages get visited, not what you type or upload inside a tool. There is nothing to sign in to and no profile is attached to your input.
  • 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.