QR codes are everywhere: restaurant menus, visiting cards, Wi-Fi cards in cafés, event tickets, product packaging and shop counters. Making one takes seconds. Making one that scans first time, on any phone, from the distance people will actually stand, takes a little planning. Most failed codes break the same few rules.
This guide explains what the parts of a QR code do, how much information one can hold, how to size and color it for print, how to test it properly, and how to protect yourself and your customers from fake codes. You can follow along with the free freetoolza QR Code Generator, which runs entirely in your browser.
The anatomy of a QR code
A QR (Quick Response) code is a grid of black and white squares called modules. It was invented in 1994 by Denso Wave in Japan to track car parts, and the format is now an international standard. Every code contains the same functional parts, and knowing them explains most scanning problems:
- Finder patterns: the three large squares in the corners. They let a camera locate the code and work out its angle, even when the phone is tilted.
- Quiet zone: the empty border around the code. Without it, the camera cannot tell where the code ends and the background begins.
- Timing patterns: lines of alternating modules between the finder patterns that tell the scanner the size of the grid.
- Alignment patterns: smaller squares in larger codes that help correct for curved or angled surfaces.
- Format and version information: a few modules near the finders that record the error correction level and masking pattern.
- Data and error correction: everything else. Your content is stored here along with extra recovery data.
Versions, capacity and why shorter is better
QR codes come in 40 sizes called versions. Version 1 is 21 × 21 modules; each version adds 4 modules per side, up to 177 × 177 for version 40. The generator automatically picks the smallest version that fits your content.
The more you put in, the higher the version and the smaller each module becomes when the code is printed at a fixed size. Small modules are harder for cameras to resolve, especially in poor light or from a distance. That is the single most important rule of QR design: keep the content short.
| Content | Typical length | Result at Medium error correction |
|---|---|---|
| Short website address | 20–30 characters | Small, quick-to-scan code (around version 2 or 3) |
| Long link with tracking parameters | 100–150 characters | Noticeably denser code (around version 6 to 8) |
| Several paragraphs of text | 500+ characters | Very dense code that needs to be printed large |
If your link is long, consider pointing the code to a short page on your own website instead, such as yoursite.com/menu. Remove tracking parameters you do not need, and use the URL Encoder to check that any special characters are encoded correctly before you generate the code.
Error correction: how much damage a code can survive
QR codes use Reed–Solomon error correction, the same family of techniques used on CDs and in satellite communication. Extra data is added so a scanner can rebuild the content if part of the code is unreadable. There are four levels, recovering roughly 7%, 15%, 25% and 30% of the data. Higher levels make the code denser for the same content, so there is a trade-off:
- For codes on screens, slides and clean documents, Low or Medium keeps the code small.
- For printed flyers, packaging and menus that get handled, Medium or Quartile is safer.
- For stickers, outdoor signs, table cards and anything exposed to dirt, scratches or folds, choose High.
Planning a code for print
Size it for the scanning distance
A widely used rule of thumb is that a code should be about one tenth as wide as the distance it is scanned from. Use it as a starting point, then test:
| Where it is used | Scanning distance | Suggested code width |
|---|---|---|
| Visiting card, product label | 15–25 cm | 2–2.5 cm |
| Restaurant table card, flyer | 30–50 cm | 3–5 cm |
| Counter standee, A4 notice | 1 m | about 10 cm |
| Poster on a wall | 2 m | about 20 cm |
| Banner or shop sign | 5 m | about 50 cm |
Dense codes need more room than these figures. If the generator reports a high version number, either shorten the content or print larger.
Use the right file
Send printers and designers the SVG file. It is vector artwork, so it stays perfectly sharp at any size. For documents, slides and websites, a PNG is fine. Never enlarge a small PNG for print: the module edges blur and scanners struggle. If you must use a PNG, download the largest size, and if you need a specific pixel size afterwards, use the Image Resizer rather than stretching it in a word processor.
Get the colors and contrast right
- Dark on light. Phone cameras expect dark modules on a light background. Inverted codes (light on dark) are not read by every scanner.
- Strong contrast. Navy, dark green or deep maroon on white can work well. Yellow, light grey, pastel shades and gradients often fail. The Color Toolkit helps you pick a darker shade of a brand color by lowering its HSL lightness.
- Plain background. Do not place the code over a photo or pattern. Put it on a solid light panel instead.
- Matte finish. Glossy lamination and shiny metal reflect light into the camera. Test under the lighting where the code will be used.
Respect the quiet zone
The standard quiet zone is four modules wide on every side. Designers often crop it to make the code “fit”, or place text right up against the edge. This is one of the most common reasons a code works on screen but fails on paper. Keep the full border, and put any “Scan to view menu” text outside it.
A testing checklist before you print hundreds
- Test on at least two phones, ideally one Android and one iPhone, using the built-in camera app rather than a special scanner.
- Print a test copy at the final size on the final paper. Screen tests do not show problems with print quality or gloss.
- Scan from the real distance and at a slight angle, the way people will actually hold their phones.
- Test in the real lighting: a dim restaurant, bright sunlight, or under shop lights.
- Check the destination: open the link on mobile data, not just office Wi-Fi, and make sure the page loads quickly and looks right on a small screen.
- For Wi-Fi codes, confirm a phone actually joins the network; a wrong password or security type will look like a scanning problem.
Static or dynamic codes?
A static code stores your content directly. It never expires, works offline for things like Wi-Fi and phone numbers, and does not depend on any company staying in business. A dynamic code stores a short link to a service, which redirects to your real destination. Dynamic codes let you change the destination and count scans, but they usually require a subscription and stop working if the service closes or your plan lapses.
For most small businesses there is a simple middle path: create a static code that points to a page on your own website. You can update that page whenever you like, and you can see visits in your own analytics, with no third party involved.
Staying safe from fake QR codes
Because people cannot read a QR code by eye, scammers use them to hide malicious links, a trick often called “quishing”. Common versions include stickers placed over genuine codes on parking meters or posters, and codes in emails or messages that lead to fake login or payment pages.
- Check the preview. Phone cameras show the web address before opening it. Read it, and do not open a link whose domain you do not recognise.
- Look for stickers. If a code in a public place looks like a sticker on top of another code, do not scan it.
- Never enter passwords or OTPs on a page you reached from an unexpected code. Go to the official app or type the address yourself.
- Be careful with payment codes. Scanning a payment code should only ever be used to send money. You never need to scan a code or enter your UPI PIN to receive money.
- For business owners: check your displayed codes regularly, print them on durable material, and consider adding your web address in text below the code so customers can confirm it.
Practical ideas for small businesses
- Restaurants and cafés: a menu link on each table, plus a separate Wi-Fi code at the counter.
- Shops: a code at the billing counter that opens your WhatsApp business number, Google review page or website.
- Freelancers: a code on your visiting card linking to your portfolio, or an email code that opens a pre-filled enquiry.
- Events: codes on posters for registration, the venue location and the schedule.
- Classrooms and offices: codes on notices linking to forms, documents or the guest Wi-Fi.
Frequently asked questions
Why does my QR code scan on screen but not on paper?
The usual causes are printing too small, a missing quiet zone, low ink contrast, glossy reflections or a PNG that was enlarged and blurred. Reprint from the SVG at a larger size with the full white border.
Can a QR code contain a virus?
The code itself only holds text, but that text is often a link, and the link can lead to a harmful website. Always check the address your phone shows before opening it.
Do I need an app to scan QR codes?
Most modern Android phones and iPhones scan QR codes directly from the camera app or a built-in scanner, so no extra app is needed.
Is it free to use QR codes commercially?
Yes. Denso Wave holds the patent rights but has chosen not to exercise them, so anyone can create and use QR codes. “QR Code” is a registered trademark of Denso Wave.
Ready to create one? Open the QR Code Generator, keep your content short, choose the right error correction level, and test a printed copy before you share it.


