QR Code Generator Guide: How QR Codes Work, Types, Size & Safe Use (2026)

By FreeToolCalculators Editorial Team | Published: 7 October 2026 | Updated: 7 October 2026 | Reading time: about 13 minutes Restaurant menus, shop payments, event tickets, Wi-Fi sharing, product packaging, business cards, posters and even gravestones now carry QR codes. They became everyday objects because they solve a small but annoying problem: typing. Instead of […]

qr code generator
By FreeToolCalculators Editorial Team | Published: | Updated: | Reading time: about 13 minutes

Restaurant menus, shop payments, event tickets, Wi-Fi sharing, product packaging, business cards, posters and even gravestones now carry QR codes. They became everyday objects because they solve a small but annoying problem: typing. Instead of entering a long web address or a password, you point your phone’s camera at a square pattern, and it does the work.

Creating a QR code takes only a few seconds with a generator, but doing it well takes a little knowledge. What can you put in a QR code? Why do some codes scan instantly and others fail? How big should a printed code be? What is the difference between static and dynamic codes? And how do you scan safely, when scammers also use QR codes? This guide answers all of those questions. You will learn how QR codes work, what types of content they can hold, how to choose the settings, how to calculate the right size, how to design them to scan reliably, and how to stay safe. There are worked examples and practice questions. To create one now, use our free QR code generator.

Quick Answer: How to Make a Good QR Code

  • Choose what to encode (a link, text, Wi-Fi details, a contact card and so on).
  • Keep the data short, because shorter content makes a simpler, easier-to-scan code.
  • Pick medium (M) or higher error correction.
  • Use dark modules on a light background, with a blank border of at least four modules.
  • Print it large enough (at least about 2 cm, and about one tenth of the scanning distance) and test it on several phones.

What Is a QR Code?

A QR code (Quick Response code) is a two-dimensional barcode: a square grid of small black and white squares, called modules, that stores information. A traditional barcode, like those on groceries, holds data in one direction, as a row of vertical lines, and can store only a small number of digits. A QR code stores data in two directions, so it can hold far more, including web addresses, text and even small files.

QR codes were invented in 1994 by Masahiro Hara and his team at Denso Wave, a company in the Toyota group, to track vehicle parts on the production line. The aim was a code that could be read very quickly from any angle and could hold more than a standard barcode. The company chose not to enforce its patent rights over the basic code, which helped it spread worldwide. Smartphone cameras that can read QR codes without a separate app, and the rise of contactless services, made them mainstream.

To a computer, a QR code is a block of data converted to bits: zeros and ones. If you want to know how much data you can store in digital files in general, our guide on data storage units explains bits, bytes and kilobytes.

How a QR Code Works

Every QR code has the same standard parts, which let a scanner find, orient and read it quickly.

  • Finder patterns: the three large squares in three corners. They let the scanner locate the code and work out its orientation, so it can be read at any rotation. That is why there is no square in the fourth corner.
  • Alignment patterns: smaller squares inside larger codes that help correct distortion when the code is on a curved or tilted surface.
  • Timing patterns: alternating black and white lines that help the scanner work out the size of each module.
  • Format and version information: small areas next to the finder patterns that tell the scanner the error correction level and the code’s size.
  • Data and error correction modules: the rest of the grid, holding your message and extra repair data.
  • Quiet zone: the blank border around the code (at least four modules wide) that separates it from its surroundings.

From Text to Pattern

  • The generator chooses an encoding mode based on the content: numeric (digits only), alphanumeric (digits, capital letters and a few symbols), byte (general text, including lowercase letters and web addresses) or kanji.
  • It converts the message into a string of bits.
  • It adds error correction data using a mathematical method called Reed-Solomon coding.
  • It arranges the bits in the grid, adds the fixed patterns, and applies one of eight mask patterns, picking the one that makes the code easiest to scan.

The scanner reverses the process: it finds the three corners, reads the modules, undoes the mask, fixes any errors using the extra data and decodes the message. Your phone then decides what to do with it, such as opening a link or offering to join a Wi-Fi network.

Versions, Size and Capacity

QR codes come in 40 sizes, called versions. A higher version has more modules and can store more data.

Modules per side = 17 + 4 × Version

QR code versions and grid size
Version Calculation Grid size (modules)
1 17 + 4 × 1 21 × 21
2 17 + 4 × 2 25 × 25
3 17 + 4 × 3 29 × 29
5 17 + 4 × 5 37 × 37
10 17 + 4 × 10 57 × 57
40 17 + 4 × 40 177 × 177

Capacity

The largest code (version 40, with the lowest error correction) can store roughly 7,089 digits, 4,296 alphanumeric characters or 2,953 bytes. At small sizes, capacity is modest. In byte mode (which web addresses use), approximate capacities are:

Approximate byte-mode capacity of small versions
Version Level L (7%) Level M (15%)
1 17 bytes 14 bytes
2 32 bytes 26 bytes
3 53 bytes 42 bytes
4 78 bytes 62 bytes

These values come from standard capacity tables and are approximate for this explanation. Let us see what they mean in practice. The web address https://freetoolcalculators.com/ has 32 characters, so it fits exactly in a version 2 code at level L (25 × 25 modules), or in a version 3 code at level M (29 × 29 modules). A longer address, such as one with tracking parameters of 100 characters, needs a much bigger, denser code, which is harder to scan at small sizes.

Lesson: shorter data means fewer modules, and fewer modules mean each module can be larger for the same printed size, making the code easier to scan. That is why URL shorteners and short, clean links make better QR codes.

Error Correction Levels

QR codes include built-in repair data, so a code can still be read if some of it is dirty, scratched, faded or covered, for example by a logo. There are four levels.

QR code error correction levels
Level Recovers up to Best for
L (Low) about 7% damage Clean, digital screens and very short data
M (Medium) about 15% damage General use, a good default
Q (Quartile) about 25% damage Printed codes that may get worn
H (High) about 30% damage Codes with a logo, or in rough conditions

There is a trade-off: higher error correction means more redundancy, so the same message needs a bigger, denser code. Using level H for a long web address makes the code complicated. Choose the lowest level that suits the conditions: M for most uses, Q or H for outdoor stickers, packaging or codes with a logo in the centre.

Keep in mind that a logo covers real modules. Even with level H (30% recovery), a logo should cover only a small portion of the code, such as 10% to 15% of its area, to leave a safety margin for printing and scanning errors.

What You Can Put in a QR Code

A QR code stores text. Your phone interprets that text based on its format.

Common QR code content types and formats
Type What it does Example format
Website link Opens a web page https://example.com/page
Plain text Shows a message Any text
Wi-Fi Offers to join a network WIFI:T:WPA;S:Home;P:abc123;;
Contact (vCard) Adds a contact BEGIN:VCARD … END:VCARD
Email Starts an email mailto:hello@example.com
Phone number Starts a call tel:+911234567890
SMS Prepares a text message SMSTO:+911234567890:Hello
Location Opens a map point geo:28.6139,77.2090
Calendar event Adds an event BEGIN:VEVENT … END:VEVENT
Payment Opens a payment app upi://pay?pa=name@bank&pn=Name

Wi-Fi Codes

A Wi-Fi code lets guests join your network without typing a password. The format is WIFI:T:WPA;S:NetworkName;P:Password;;, where T is the security type (WPA, WEP or nopass), S is the network name and P is the password. For a network named “Home” with the password “abc123”: WIFI:T:WPA;S:Home;P:abc123;;. Anyone who sees the printed code can read the password from it, so print it only where you are comfortable sharing access, and use a strong password. Our guide on password generator safety explains how to create one.

Contact Cards (vCard)

A business card QR code can hold your name, phone, email, company and website. The more fields you add, the denser the code becomes. Keep it to the essentials, or link to an online profile page instead.

Payments

Payment QR codes, such as UPI codes in India, hold the payee’s details and sometimes an amount. A shop usually displays a fixed code for you to scan and pay. Be aware of the scams described in the safety section below.

Static vs Dynamic QR Codes

This is one of the most important choices when you create a code.

Static and dynamic QR codes compared
Feature Static QR code Dynamic QR code
Where data is stored Directly in the pattern On a server; the code holds a short redirect link
Can the destination change? No. You must print a new code. Yes, you can edit the destination later.
Scan tracking No Often yes (counts, time, device, rough location)
Complexity of the pattern Depends on the data length Usually simple, as the redirect link is short
Cost Usually free Often needs a subscription
Risk None from a service, but it is permanent Stops working if the service or your plan ends
Best for Wi-Fi, contact cards, permanent links, short text Menus, campaigns, packaging, anything that may change

Which Should You Choose?

  • If the content will never change and you want the code to work forever, use static.
  • If you print thousands of items and may need to fix the link later, or you want analytics, use dynamic, but choose a reputable provider and keep your subscription active, since the code stops working if the service stops.
  • A cheaper alternative for a changeable link is to point a static code at your own page (such as yoursite.com/menu) and edit that page whenever you need. You control the redirect, and the code never has to change.

Be cautious of “free” generators that quietly create dynamic codes and then stop them from working unless you pay. Always test your code after creating it, and keep a copy of the original destination.

How to Create a QR Code Step by Step

  • Decide the purpose. What action do you want people to take after scanning?
  • Prepare a clean destination. Use a short link to a mobile-friendly page. Check that the page loads quickly, because many people scan on mobile data.
  • Choose the content type (URL, Wi-Fi, vCard and so on) in the generator and fill in the fields.
  • Choose static or dynamic based on the table above.
  • Select error correction. Use M by default, and Q or H for harsh conditions or if you add a logo.
  • Choose colours. Use dark modules on a light background with strong contrast.
  • Generate and download in the right format: PNG for screens (large enough, at least 1,000 pixels wide for print), SVG or PDF for professional printing, as these vector formats stay sharp at any size.
  • Test it with at least two or three different phones (Android and iPhone) and different scanning apps, under realistic conditions, at the real size and distance.
  • Add a call to action next to the code, such as “Scan to see the menu”, so people know what they will get. Include the short URL in text as a fallback, too.

Your destination page should also have decent text and design. Our guide on the word counter for SEO helps you write clear page content, which is useful if your QR code leads to an article or landing page.

Print Size and Scanning Distance

A QR code that is too small for its scanning distance will fail. Two simple rules help.

Rule 1: Minimum Size

For printed codes read from close range (such as on a business card or a leaflet), a minimum of about 2 cm × 2 cm (about 0.8 inch) is a common guideline, provided the data is short. For dense codes, make it larger.

Rule 2: The 10-to-1 Distance Rule

Minimum code width ≈ Scanning distance ÷ 10

  • Scanned from 30 cm (a flyer): 3 cm.
  • Scanned from 1 m (a table card or counter sign): 10 cm.
  • Scanned from 2 m (a wall poster): 20 cm.
  • Scanned from 3 m (a shop window or billboard): 30 cm.

These are approximate guides for typical phones. Better cameras, good lighting and a simple code allow smaller sizes, while poor lighting, glare or a dense code require larger ones. Always test at the real distance.

Module Size

Another way to think about it is the size of each module. Printed modules smaller than about 0.25 to 0.5 mm are unreliable. To find the printed width, count the modules plus the quiet zone and multiply by the module size.

Example: A version 3 code has 29 modules per side. Add a quiet zone of 4 modules on each side: 29 + 8 = 37 modules. At 0.5 mm per module, the total width including the blank border is 37 × 0.5 = 18.5 mm. A version 10 code (57 modules) with a quiet zone has 65 modules; at the same 0.5 mm per module, it needs 65 × 0.5 = 32.5 mm.

That is why short data matters: a short link in a version 3 code prints much smaller than a long link in a version 10 code at the same module size. For help with centimetre and inch conversions when preparing artwork, see our guide on the length converter. The distance-to-size rule is a simple ratio, as explained in ratio and proportion.

Design Tips for Reliable Scanning

  • Keep strong contrast. Dark modules on a light background are best. Black on white is the safest. Dark blue, green or deep red on white also work, but pale colours on a light background fail.
  • Do not invert the colours (light modules on a dark background), as many scanners do not read inverted codes reliably.
  • Keep the quiet zone. Leave a blank border of at least four modules. Do not put text or images right up against the code.
  • Do not stretch or distort the code. Keep it perfectly square.
  • Use a small logo only with high error correction, and keep it to the centre. Test the code afterward.
  • Avoid fancy shapes and gradients that blur the boundaries between modules. Rounded modules and colours are fine if the contrast and the three finder squares remain clear.
  • Print on matte, flat surfaces. Glossy paper, curved bottles and reflective metal cause glare. If a curved surface is unavoidable, make the code larger and use higher error correction.
  • Use vector files for print (SVG, PDF or EPS) so the edges stay sharp.
  • Test in real lighting, including dim light and bright sunlight, if the code will be used in those conditions.
  • Add a visible label and a text link as a backup for people who cannot scan.

Smart Uses

  • Restaurants and cafés: link to a digital menu that you can update. Use a dynamic code or a code pointing to your own menu page.
  • Retail and packaging: link to product details, manuals, warranty registration or recipes.
  • Business cards: a vCard or a link to your online profile.
  • Events: tickets, schedules, check-in and feedback forms.
  • Education: links to resources on worksheets and posters.
  • Real estate: signs that link to listings and virtual tours.
  • Home: Wi-Fi sharing for guests, and labels on boxes that link to inventory lists.
  • Payments: displaying a shop’s payment code at the counter.
  • Travel: boarding passes and hotel check-in.
  • Health and safety: links to instructions, emergency contacts or information labels.
  • Developers and teams: sharing configuration data or links to formatted data, such as in our guide to the JSON formatter, within size limits.

Scanning Safely and Avoiding Scams

A QR code is just a way to deliver data, and it hides the destination from the human eye. Criminals take advantage of that. Using fake QR codes to send people to malicious websites is sometimes called “quishing” (QR phishing).

Common Tricks

  • Sticker overlays: a fake code stuck over the real one on a poster, parking meter, restaurant table or payment standee.
  • Fake payment requests: a code that makes you send money instead of receiving it, or that leads to a fake payment page.
  • Phishing pages: codes in emails, texts or letters leading to fake login pages for banks, delivery services or accounts.
  • Malicious downloads: codes that lead to a fake app or file.
  • Unexpected codes: codes on unsolicited parcels, notices or public stickers offering prizes, refunds or “urgent” actions.

The “Receive Money” Scam

A very common scam, particularly with instant payment systems such as UPI in India, goes like this: a stranger who wants to “pay” you, often when you are selling something online, sends you a QR code and says, “Scan this and enter your PIN to receive the money.” This is false. You never need to scan a code, approve a request or enter your PIN to receive money. A PIN is only for sending money. If anyone asks you to scan or enter your PIN to receive a payment, it is a scam, so stop and do not proceed. Check with your bank or payment app for official guidance.

How to Stay Safe

  • Preview the link before opening. Most phone cameras show the web address when you scan. Read it carefully. Look for misspellings, strange domains, long random strings or shortened links to unknown sites.
  • Be cautious with codes in public places. Check whether a sticker looks like it was placed on top of another.
  • Do not enter passwords, OTPs, card details or PINs on a site you reached from a code unless you are certain it is genuine. Where possible, open the official app or type the site’s address yourself.
  • Never share OTPs or approve unexpected payment requests.
  • Avoid installing apps from QR codes. Use your phone’s official app store.
  • Use up-to-date software and a scanner that shows the link before opening it.
  • Be wary of urgency. Scammers push you to act quickly. Take a moment to check.
  • If you own the code, inspect public codes regularly for tampering, and place them where staff can see them, or protect them under clear covers.

If you think you have been scammed, contact your bank immediately, change affected passwords and report it through your country’s official cybercrime channels.

Privacy and Tracking

Dynamic QR codes can record when and how many times they are scanned, and sometimes the device type and approximate location. This can be useful to a business but is also a privacy matter.

  • If you create dynamic codes for the public, be transparent and follow local privacy laws, especially if you collect personal data.
  • If you scan codes, remember that a tracked link can tell the owner that you scanned it. If that concerns you, avoid unknown codes.
  • Do not encode sensitive personal information (such as ID numbers, medical details or passwords you do not want exposed) in a code that others can scan. Anyone with the code can read static data.
  • When you create a code with an online generator, check the provider’s privacy policy. Prefer tools that generate the code in your browser, especially for Wi-Fi passwords and contact details.

Troubleshooting

Why a QR code might not scan, and what to try
Problem Likely cause Fix
Code scans slowly or not at all at distance Too small, or too dense Make it larger, or shorten the data
Works on screen but not in print Low resolution or colour contrast Use a vector file, black on white, higher print quality
Fails when a logo is added Logo is too big or error correction too low Reduce the logo, use level H
Fails on curved or shiny surfaces Distortion and glare Enlarge it, use a matte finish, test on that surface
Scans but the page is blank or broken Wrong or expired link Test the destination and keep dynamic plans active
Some phones scan it and others do not Weak contrast, missing quiet zone, inverted colours Restore the border, use dark on light
Wi-Fi code does not connect Wrong format or security type Check the string, especially T, S and P fields and the semicolons

Common Mistakes

  • Encoding very long URLs. They make dense codes that are hard to scan. Use a short link.
  • Printing too small. Follow the 10-to-1 distance rule.
  • Removing the quiet zone. Without it, scanners struggle to find the code.
  • Low contrast or inverted colours. Stick to dark on light.
  • Forgetting to test. Always test on several phones before printing thousands of copies.
  • Using a dynamic code without a plan to keep it alive. If the subscription ends, the code may die.
  • Linking to a page that is not mobile friendly. Most scans come from phones.
  • Putting sensitive data in a public static code. Anyone can read it.
  • Ignoring security. Check the link before scanning, and be wary of codes in unexpected places.
  • No label. People are more likely to scan a code if they know what they will get.

Practice Questions

  • How many modules per side does a version 5 QR code have?
  • Which error correction level can recover about 30% of damage?
  • A poster will be scanned from 2 metres. What is the approximate minimum code size?
  • A restaurant changes its menu often. Should it use a static or a dynamic QR code?
  • Write the Wi-Fi QR string for a WPA network named “Home” with password “abc123”.
  • A buyer asks you to scan a QR code and enter your PIN to “receive” payment. What should you do?

Answers

  1. 17 + 4 × 5 = 37 modules (a 37 × 37 grid).
  2. Level H.
  3. 200 cm ÷ 10 = 20 cm.
  4. A dynamic code, or a static code that points to the restaurant’s own editable menu page.
  5. WIFI:T:WPA;S:Home;P:abc123;;
  6. Refuse. You never need to scan a code or enter a PIN to receive money. It is a scam.

Frequently Asked Questions

What does QR stand for?

Quick Response. The code was invented in 1994 by Denso Wave to track vehicle parts in manufacturing.

What is the difference between static and dynamic QR codes?

A static code stores data directly and cannot be changed. A dynamic code stores a short redirect link, so you can change the destination and track scans, but it depends on the service hosting the redirect.

How big should a printed QR code be?

At least about 2 cm square for close-range use, and roughly one tenth of the scanning distance, so a code scanned from 1 metre should be about 10 cm wide.

What is QR code error correction?

It is built-in redundancy that lets a code be read even when part of it is damaged or covered. Levels L, M, Q and H recover about 7%, 15%, 25% and 30%.

Are QR codes safe to scan?

Scanning itself is generally safe, but the destination may not be. Preview the link, be careful with codes in public places and never enter sensitive details on a site you reached unexpectedly.

Can a QR code expire?

A static code never expires, but the page it points to can disappear. A dynamic code can stop working if the service or your subscription ends.

Do QR codes need an internet connection?

Scanning a code does not, but opening a web link does. Codes holding plain text, a Wi-Fi setup or a contact card can work offline.

Conclusion

A good QR code is short, high-contrast, properly sized and tested. Choose static codes for permanent information and dynamic codes for content that changes, leave the quiet zone, use sensible error correction and size it for the scanning distance. As a user, stay alert: check the link before opening it, treat stickers in public places with caution, and never scan or enter a PIN to receive money. Used wisely, QR codes save time and make information easy to share.

To make yours in seconds, use our free QR code generator, and keep learning with these related guides:

Related Articles

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top