QR Codes: Error Correction, Size and Logos, Explained

A QR code that does not scan is worse than no code at all: it sits on a poster or a menu looking like it works while quietly failing. Almost every failure comes from the same few causes, such as a logo that is too big, colors with too little contrast, a printed size that is too small, or a missing margin. This guide explains how a QR code survives damage, how to put a logo in one safely, and how to check a code before you print thousands of them.

What is inside a QR code

A QR code is a square grid of dark and light cells called modules. Three parts of it matter when you design one:

  • The finder patterns are the three large squares in the corners, often called the "eyes". A camera uses them to find the code, work out which way up it is and correct for tilt. Change their colors or corner shape if you like, but keep them recognizable.
  • The quiet zone is the empty margin around the code. The standard asks for at least four modules of blank space on every side. Without it, a scanner cannot tell where the code ends and the background begins.
  • The version sets the size of the grid, from 21 × 21 modules up to 177 × 177. The more text you encode, the higher the version, and the more modules the code has.

The size of the grid matters in print. For the same printed width, a code with more modules has smaller modules, and smaller modules are harder for a camera to resolve. This is why a short web address makes a more robust code than a long one.

Error correction: why a damaged code still scans

When a QR code is made, extra recovery data is stored alongside your content. If part of the pattern is dirty, scratched, folded or covered, the scanner uses that extra data to rebuild what is missing. There are four levels, and a higher level can rebuild more:

Level Can rebuild up to about Typical use
L (Low) 7% Clean screens and tidy print where you want the smallest code
M (Medium) 15% General use, the common default
Q (Quartile) 25% Print that may get scuffed, small logos
H (High) 30% Logos, outdoor signs, packaging and stickers

Higher correction is not free. The recovery data takes up room, so the same text needs a denser code at level H than at level L. At a fixed printed size, the denser code has smaller modules. A sensible default is M for plain codes and Q or H as soon as you add a logo or expect wear.

Adding a logo without breaking the code

A logo covers real modules. The code keeps working only because the error-correction data can rebuild what the logo hides. That sets a hard limit on the logo's size, and the limit depends on the level you chose:

  • At level L, a logo can be only about a tenth of the code's width.
  • At level H, a logo can be roughly a quarter of the code's width.

Cover more than that and the scanner has too little left to work with. The QR Code with Logo tool ties the two together: its Auto setting raises the correction to Q or H when a logo is present, and the logo size slider stops at the largest logo the chosen level can rebuild. A few more habits help:

  • Use a simple logo on a transparent or plain background. Fine detail turns to mush at logo size.
  • Put a plate (a solid square or round backing) behind the logo so its edges do not merge with the modules.
  • Keep the logo in the center and away from the finder patterns.
  • Never trust a logo you have not tested. Decode the finished image, and scan a printed proof on a phone.

Colors and contrast

Scanners look for dark modules on a light background with strong contrast. Aim for a contrast ratio of at least 4 to 1. Dark navy on white is safe, yellow on white is not.

  • Do not invert the code. Light modules on a dark background fail in many scanner apps, even though some read them. If you want a dark design, put a light panel behind the code.
  • Gradients work as long as both ends stay dark enough against the background.
  • Stylized modules (rounded, dotted or diamond shapes) scan fine in most cases. The more you change, the more you should test on a few different phones.
  • Leave the quiet zone clear. Do not run a frame, a photo or text into the margin.

Size and print

Three numbers cover most print jobs:

  • Print at least 2 cm (about ¾ inch) wide for a code scanned from close by, such as on a business card.
  • Allow about ten times the code's width as the scanning distance. It is a rule of thumb, but it gives you a start: a 5 cm code on a table tent is comfortable at around 50 cm, and a 1 m poster works from about 10 m.
  • Keep the quiet zone at least four modules wide on every side.

If the code is for a screen, a PNG at 1024 pixels or more is plenty. If it will be printed or enlarged, export an SVG, which is a vector format and stays sharp at any size. A small PNG scaled up for print goes soft at the edges, which is a common reason for a code that scans on screen but not on paper.

Static codes and short links

A code made in your browser is static: your text or web address is stored in the pattern itself. It works for as long as the destination works, and it does not depend on any service, account or subscription. The trade-off is that you cannot change where it points afterwards, so check the address carefully before you print.

Use the shortest real address you control. Avoid third-party link shorteners you do not control, because the code stops working if the shortener does. Remove tracking parameters you do not need, because every extra character makes the code denser.

Test before you print

  1. Decode the finished image. The QR Code with Logo tool decodes the rendered image after every change and shows whether the same text comes back.
  2. Scan a proof on paper at its real size, from the real distance, with at least two different phones.
  3. Try bad conditions. Dim light, a slight angle and a little glare tell you how much margin you have.
  4. Check the destination. Open the link the code points to, so a typo does not go to print.

Make a code with your logo

The QR Code with Logo tool puts your logo in the middle of a code and restyles the colors, module shapes, eyes and an optional frame such as "SCAN ME". It accepts PNG, JPEG, SVG or WebP logos up to 1 MB, downloads PNG from 256 to 2048 pixels or SVG for print, and decodes the result before you download it. Everything runs in your browser: neither the logo nor the text you encode is uploaded, and only the design settings are remembered on your device.

Frequently asked questions

What does error correction mean in a QR code? The code stores extra recovery data alongside your content, so a scanner can rebuild the parts that are damaged, dirty or covered by a logo. Levels L, M, Q and H can rebuild about 7%, 15%, 25% and 30% of the code.

Which QR error correction level should I use? Level M suits most plain codes. Choose Q or H when you add a logo or expect the print to wear, such as on packaging, stickers and outdoor signs. Higher levels make the code denser, so the printed modules get smaller.

How big can a logo be in a QR code? It depends on the level. At level L it can cover only about a tenth of the code's width, and at level H roughly a quarter. A bigger logo hides more than the recovery data can rebuild.

What size should a printed QR code be? At least 2 cm wide for close scanning, with a margin of at least four modules. For distance, allow roughly ten times the code's width as the scanning distance.

Do QR codes expire? A static code, with the address stored in the pattern, never expires. It stops working only if the page it points to disappears. Codes that route through a third-party service can stop working when that service does.

Do colored QR codes scan? Yes, if there is strong contrast, with dark modules on a light background. Avoid inverted (light on dark) codes and low-contrast pairs.

Should I save a QR code as PNG or SVG? SVG for anything printed or enlarged, because it stays sharp at any size. PNG at 1024 pixels or more for web pages, slides and documents.

Keep going

QR Code with Logo