QR codes that work: sizes, error correction, colours and UPI
How QR codes store data, how large to print them, which error-correction level to choose, how to add colours and logos safely, and how UPI payment QR codes are built.
By Toolew Team ·· 5 min read
Table of contents
QR codes are everywhere, from restaurant menus to payment counters and product packaging, yet a surprising number of them fail to scan. They are printed too small, placed on glossy curved surfaces, styled with low-contrast colours or covered by a logo that destroys too much data. This guide covers the decisions that make a QR code reliable, plus the specifics of payment and Wi-Fi codes.
What is inside a QR code
A QR code is a grid of black and white squares called modules. Three large squares in the corners let a camera find the code and work out its orientation. The rest of the grid holds your data, encoded with Reed–Solomon error correction, the same family of codes used on CDs and in deep-space communication. Error correction is what allows a code to scan even when part of it is dirty, scratched or covered.
The amount of data determines the code’s version, from version 1 (21 × 21 modules) up to version 40 (177 × 177 modules). More data means more, smaller modules, which makes the code harder to scan from a distance. That is the first rule of reliable QR codes: keep the content short. A 25-character URL produces a far simpler code than a 200-character one. If your link is long, use a short URL on a domain you control.
Choosing an error-correction level
QR codes offer four levels, which trade capacity for resilience:
| Level | Approximate damage tolerated | Best for |
|---|---|---|
| L | 7% | Clean screens, maximum data |
| M | 15% | General use (the usual default) |
| Q | 25% | Printed materials, outdoor use |
| H | 30% | Codes with a logo in the centre, harsh environments |
Higher levels make the code denser for the same content. Use M for screens, Q for print and H only when you add a logo or expect wear. The QR Code Generator lets you set the level and preview the result as you change it.
How big should you print it?
A widely used rule of thumb is that the minimum code width should be about one tenth of the scanning distance. A code scanned from 30 cm away should be at least 3 cm wide; one on a poster read from 2 metres needs about 20 cm. For small printed items, do not go below roughly 2 × 2 cm, and test with an older phone, not just the newest one.
Two more printing rules matter just as much:
- Keep the quiet zone. The code needs an empty margin of at least four modules on every side. Cropping it tight against other graphics is a common cause of failure.
- Export as vector when possible. An SVG scales to any print size without blurring. If you must use PNG, export at a high resolution.
Colours and logos
Scanners look for contrast between dark and light modules, not for black and white specifically. Coloured codes work if you follow two rules:
- Dark foreground on a light background. Inverted codes (light on dark) fail on many older scanners.
- Strong contrast. Navy on white or dark green on pale yellow is fine; mid-grey on light grey is not. A simple test is to convert your design to greyscale: if the code still looks crisp, it will scan.
A logo in the centre covers data modules, so it relies entirely on error correction. Use level H, keep the logo below about 20–25% of the code’s area, leave the three corner finder patterns untouched and always test the final printed version on several phones.
Static versus dynamic codes
The codes created by Toolew are static: the content is stored in the pattern itself. They never expire, need no account and keep working for as long as the content inside them is valid. “Dynamic” QR services instead encode a short redirect link on their own servers so they can change the destination or count scans. That can be handy for marketing, but if the service shuts down or the subscription ends, every printed code stops working. For menus, business cards, Wi-Fi details and payment codes, static codes are the safer choice.
Wi-Fi QR codes
A Wi-Fi code stores the network name, password and security type in a standard format (WIFI:T:WPA;S:MyNetwork;P:secret;;). Modern iPhone and Android cameras recognise it and offer to join the network without typing anything. The WiFi QR Code Generator handles the escaping of special characters such as ; and : in passwords, which is where hand-made codes often break. Remember that anyone who can photograph the code can read the password, so for a business, use a separate guest network.
UPI payment QR codes
In India, UPI QR codes follow the NPCI deep-link format:
upi://pay?pa=merchant@bank&pn=Shop%20Name&am=250.00&cu=INR&tn=Order%2042
pais the payee’s UPI ID (virtual payment address) and is required.pnis the payee name shown to the customer.amis an optional fixed amount; leave it out to let the customer enter the amount.cuis the currency, alwaysINR.tnis an optional note that appears in the transaction.
The UPI QR Code Generator checks that the UPI ID looks valid, encodes the values correctly and produces a printable code that works with any UPI app. Always make a small test payment before printing a code for a counter or invoice, and check that the name shown in the app matches your account.
A safety note for customers: scanning a QR code is only needed to pay money, never to receive it. Fraudsters often send a QR code claiming you will receive a refund or prize after scanning and entering your PIN. Entering a UPI PIN always authorises a payment out of your account.
Contact cards and other content
A vCard code (created with the vCard QR Code Generator) lets someone save your name, phone, email and company to their contacts in one tap. Keep it short: every extra field makes the code denser. Other useful types include email drafts, SMS messages, calendar events and map locations.
Test before you print
Before ordering a thousand flyers, scan the final file with at least two different phones and the QR Code Scanner, from the distance and angle people will actually use. Check it in the lighting where it will be displayed. A one-minute test is far cheaper than a reprint.