How to create a QR code for a website

Choose the right destination, generate the code, pick the right file and size — then test it the way a real user will.

Updated 5 December 2026 · 7 min read

A URL QR code is the most common kind, and the easiest to get subtly wrong. This guide covers choosing the destination, avoiding the mistakes that make links expire, and testing the code before it goes to print.

Choose the right destination

The single biggest factor in whether a QR code works has nothing to do with the code. It is where the code points.

Send people to a page built for the moment: a menu, a sign-up form, a product page, a booking screen. Sending a poster reader to a company homepage forces them to hunt for what the poster was advertising, and most will close the tab. If you cannot build a dedicated page, at least link to the specific section with an anchor (https://example.com/#offers).

Check that the page works on a phone. Test it on a real device, on mobile data rather than office Wi-Fi, and make sure it loads in a few seconds. A QR code that opens a slow, desktop-only page is worse than no QR code at all.

Create the code in four steps

  1. Open the generator. The home page starts on the URL type.
  2. Enter the address. You can type example.com/offers without the https:// — it is added for you. The field rejects anything that is not a real http or https address, which also stops dangerous links such as javascript: from being encoded by accident.
  3. Adjust the design if you need to. Keep the code dark and the background light. If you add a logo, error correction is raised automatically.
  4. Download. Choose SVG for print, PNG for screens. Give the file a name you will recognise six months from now.

Pick the right file and size

Where the code will appearFormatSuggested printed size
Business card, flyerSVG15–20 mm square
Table card, menu, stickerSVG30–40 mm square
Poster, shop windowSVG80–150 mm square
Website, email, slidePNG (512–1024 px)—
Social media postPNG (1024 px)—

The size rule that matters: the code should be roughly one tenth of the distance from which it will be scanned. A code read from 30 cm can be 3 cm wide. A code on a billboard read from 10 metres needs to be a metre wide.

Six mistakes to avoid

1. Using a long, parameter-heavy URL

Every extra character adds modules to the pattern. A 200-character tracking URL produces a dense code that needs to be printed larger to stay readable. Shorten it — either with your own short domain or by trimming parameters you do not use.

2. Forgetting that a shortener is a dependency

Short links are useful, but a free shortener can expire, be rate-limited or shut down, taking your printed code with it. If you use one, use a domain you control, or a service with a paid, permanent tier.

3. Pointing at a staging server

It is remarkably easy to encode staging.example.com and only notice after the print run. Copy the URL from the live site's address bar rather than typing it.

4. Leaving the code with no quiet zone

The blank margin around the pattern is part of the specification. Putting a QR code flush against a dark background or inside a tight border makes it hard to find. Four modules of white space on every side is the minimum; more is safer.

5. Recolouring it badly

Inverted codes — light modules on a dark background — fail on a meaningful number of scanners. Low-contrast pastels fail on almost all of them. Dark navy or black on white is not boring; it is reliable.

6. Printing too small "because it looks fine on screen"

A code that fills a phone screen is enormous compared with the same code printed at 20 mm. Print a test copy at final size and scan that, not the PDF at 200% zoom.

Test it properly

Before the print run:

  • Scan the code with at least two phones — one iPhone and one Android if you can.
  • Scan from the printed proof, in the lighting where it will actually live.
  • Check that the destination opens the intended page, not a redirect chain or a cookie wall.
  • Open the link on mobile data with Wi-Fi off.
  • Try scanning at an angle and from the expected distance.

Always print a short URL in readable text next to the code. Some people cannot use a camera, some phones are old, and some will simply prefer typing. The code should be an accelerator, not the only route.

Keep the original file. If the destination changes, you will need to print a new code — but you will at least have the design to work from. Store the SVG alongside the details of what it points to.