QR Code Best Practices: How to Make a Code That Always Scans (and Stay Safe)
Most failed QR codes fail for the same few reasons. Fix those and your code will scan on almost any phone.
Static vs dynamic QR codes
| Aspect | Static | Dynamic |
|---|---|---|
| Where the data lives | Inside the code itself | On a service that redirects the scan |
| Can the destination change? | No: make a new code | Yes |
| Scan tracking | None | Usually provided by the service |
| Risk | None from a third party | Stops working if the service or subscription ends |
| Code density | Higher for long content | Lower (short redirect link) |
The QR code generator on this site creates static codes, so they never expire and nothing is tracked. Use a dynamic code only if you need to change the destination or measure scans, and understand the dependency you are taking on.
Error correction levels
QR codes include redundancy so they can still be read when partly damaged or covered. The standard defines four levels, as described by Denso Wave, the inventor of the QR code:
| Level | Recovers about | Use when |
|---|---|---|
| L | 7% | Screens and short content |
| M | 15% | General use |
| Q | 25% | Print that may get scuffed |
| H | 30% | Rough conditions or a logo placed over the centre |
Higher levels make the code denser, so there is a trade-off with how small you can print it.
Design rules that matter
- Contrast: dark code on a light background. Light-on-dark (inverted) codes fail in some scanners.
- Quiet zone: leave a blank margin (the QR specification calls for four modules) on all sides.
- Size: bigger is easier. A code that scans at arm’s length on screen may not scan from across a room on a poster.
- Short content: shorter text or URLs produce simpler, larger-module codes. Use a short, clean URL.
- Colour: if you use brand colours, keep strong contrast between the modules and the background.
- Format: use SVG for print so the edges stay sharp at any size, and PNG for screens.
Test before you print
- Scan with at least two different phones (an iPhone and an Android).
- Test from the real viewing distance and in the real lighting.
- Check that the scanned destination is the correct one.
- Print a small proof first.
Useful content types
- Wi-Fi: lets guests join without typing the password. Anyone who scans can read the password, so use a guest network.
- Contact card (vCard): adds a contact in one scan.
- Email, phone, SMS: start a message with details pre-filled.
- Location: opens a map at given coordinates.
Sizes and distances
A common rule of thumb is that a code can be scanned from about ten times its width, so a 5 cm code scans comfortably at roughly 50 cm, and a poster code that must scan from 3 m should be around 30 cm wide. This depends on the phone camera, light and code density, so always test in the real setting. Dense codes (long content, high error correction) need to be larger than simple ones.
Where QR codes work well, and where they do not
- Good: menus, Wi-Fi sharing, event tickets, business cards, product packaging, bridging print to web.
- Poor: places with no mobile signal, tiny prints, glossy or curved surfaces that reflect light, and anywhere a short typed URL would be easier.
Add a short call to action (“Scan to see the menu”) and the plain URL beneath the code so people who cannot scan can still reach it.
Staying safe from malicious QR codes
Because you cannot read a QR code with your eyes, criminals sometimes stick fake codes over real ones or send them in emails to lead you to phishing pages. Before you act: look at the URL your phone shows, be sceptical of codes that ask for passwords or payments, check that a printed code has not been stuck over another one, and avoid entering sensitive information after a scan unless you are sure of the site.
Try it now: QR Code Generator
Free, private and runs in your browser. Nothing is uploaded.
Open QR Code GeneratorFrequently asked questions
Sources and further reading
External links open the original source. We cite primary or official documentation for factual claims and re-check them when we update an article. See our editorial policy.
Keep reading
- How to Create a Strong Password: What NIST Says NowWhat makes a password strong in 2026: length over complexity, passphrases, password managers and MFA, based on current NIST SP 800-63B-4 guidance.
- Color Contrast for Accessibility: WCAG Ratios Explained with ExamplesWhat WCAG colour contrast ratios mean (4.5:1, 3:1, 7:1), how they are calculated, how to test your colours and how to fix failing text and UI elements.
- Base64 Images and Data URIs: When They Help and When They HurtWhat Base64-encoded images and data URIs are, how to use them in HTML and CSS, their 33% size overhead and when inline images help or hurt performance.