How to make a QR code that actually scans

Error correction, quiet zones, contrast and print size: the four things that decide whether a QR code works on paper or quietly fails.

A QR code is a picture of data, and it is fragile in specific ways

A scanner does not "read" a QR code the way a person reads text. It turns the camera image into black and white pixels, finds the three big squares in the corners, works out the grid, and then reads each cell. Everything that helps or hurts a QR code comes back to that process: the corners must be findable, the grid must be regular, and each cell must be unambiguously light or dark.

That is why a code can look perfect on a screen and fail completely once printed on a menu, and why "make it smaller to fit" is the single most common way to break one.

Error correction: insurance, not free space

QR codes carry redundant data so they still decode when part of the image is damaged. There are four levels: L recovers about 7% of the symbol, M about 15%, Q about 25% and H about 30%.

The trade-off is size. Higher redundancy means more modules for the same content, and more modules means each one is physically smaller at a given print size — which can make scanning harder rather than easier. Raising the level is not automatically safer.

  1. On a screen, or on clean paper that will stay flat: L or M is plenty.
  2. On something that will be handled, folded or splashed — a menu, a loyalty card, a parcel: Q.
  3. When you intend to place a logo over the centre, or the surface is genuinely hostile: H.
  4. If the code becomes very dense at a high level, shorten the content instead of raising the level further.

The quiet zone is part of the code

The blank margin around a QR code is not decoration. The specification requires at least four modules of clear space on every side, and scanners genuinely rely on it to find the symbol’s edges.

This is the most frequently ignored requirement in QR design. A code butted up against a border, a photograph or a block of text loses its quiet zone and may stop working entirely — and the failure looks random, because it depends on what the camera happens to catch.

This tool defaults to four modules and warns you if you reduce it. If a layout has no room for the margin, make the code smaller rather than trimming the margin.

Contrast decides more than colour does

Scanners binarise the image, so what matters is the difference in lightness between the code and its background — not whether the colours look pleasingly different to you. Two colours can be obviously distinct to the eye and nearly identical once converted to greyscale.

Black on white gives a contrast ratio of 21:1. Aim for at least 7:1; below about 4:1 codes start failing on paper and in poor light, and this tool will warn you. The live contrast figure next to the preview updates as you change colours.

Keep the code darker than its background. Many scanners only look for dark-on-light, and an inverted code — light modules on a dark field — is a coin toss across devices. If you need a code on a dark design, put it inside a light panel.

Avoid gradients across the code, and be careful with a transparent background: whatever ends up behind it has to satisfy the same contrast requirement.

Size it for the scanning distance

A widely used rule of thumb is that the code’s width should be roughly a tenth of the distance it will be scanned from. A code read at arm’s length — say 30 cm — wants to be about 3 cm across. A poster scanned from three metres wants about 30 cm.

The other half of the problem is module size. Below roughly 0.4 mm per module, ordinary phone cameras start to struggle, and cheap thermal printers smear adjacent modules together. Shorter content means fewer modules, which means each module is bigger at the same overall size — which is why keeping the payload short helps more than any other single change.

Choose the right output format

Export SVG for anything that will be printed. It is vector, so it scales to any size with perfectly sharp edges, and it is what a designer or printer will want.

Export PNG for screens, documents and anywhere a bitmap is easier. Pick a generous pixel size: this tool rounds the module size down to a whole number of pixels so every module is identical, which avoids the uneven modules that appear when a code is scaled by fractions.

Never scale a PNG QR code up after exporting. Re-export it larger instead — interpolation blurs the module edges, which is precisely what the scanner needs to be crisp.

Test before you commit

Print one at the real size, on the real material, and scan it with more than one phone — ideally an old Android as well as a recent iPhone, in the light the code will actually live in. A code that works on your desk under a lamp can fail on a table by a window.

If you are placing a logo in the centre, keep it small, keep it clear of the three corner squares, and test the result rather than assuming the error correction will cover it.

Frequently asked questions

Can I put my logo in the middle?
Often, yes, if you use a high error-correction level and keep the logo well under about 20% of the area, away from the three corner finder patterns. This tool does not overlay logos, because doing it safely needs a visual check that only you can make. Export the SVG, place your logo in a design tool, and test the result.
Why did my code stop working after the designer used it?
Usually the quiet zone was cropped away, the code was scaled down past the point where modules are large enough, or it was recoloured to something with too little contrast. Give them the SVG and the four-module margin requirement in writing.
Does a longer link make the code harder to scan?
Yes. More content means more modules, so at a fixed physical size each module is smaller. Use the shortest address that works — though note this tool deliberately does not shorten links for you, because that would put a third party between your code and its destination.
Which error-correction level should I use by default?
M is a sensible default for most uses. Move to Q for anything handled or printed small, and to H only when you are covering part of the code or the surface is genuinely rough.

What this tool will not do