How to Generate QR Codes: Complete Guide for Links, Wi-Fi & More
Learn how to create QR codes for URLs, Wi-Fi passwords, email, phone, and text. Understand static vs dynamic QR codes, sizing, scanning tips, and best practices.
Try our free QR Code Generator
Create QR codes for URLs, Wi-Fi, text, and more. Download as PNG or SVG.
What is a QR Code?
A QR code (Quick Response code) is a two-dimensional barcode that stores data in a grid of black and white squares called modules. Invented in 1994 by Denso Wave for tracking automotive parts in Japan, QR codes have since become ubiquitous — from restaurant menus to boarding passes, payment systems, and marketing campaigns.
Unlike traditional barcodes that store data in one dimension (horizontal lines), QR codes encode information in both horizontal and vertical directions, allowing them to hold significantly more data — up to 4,296 alphanumeric characters or 7,089 numeric characters in a single code.
Every QR code has a specific anatomy:
- - Finder patterns — Three large squares in the corners (top-left, top-right, bottom-left) that help scanners locate and orient the code, even when scanned at an angle.
- - Alignment pattern — A smaller square pattern that helps correct distortion, especially in larger QR codes.
- - Timing patterns — Alternating black and white modules in a line between the finder patterns that help the scanner determine the grid size.
- - Data modules — The remaining black and white squares that encode the actual information using Reed-Solomon error correction.
- - Quiet zone — A blank margin around the QR code (at least 4 modules wide) that helps scanners distinguish the code from its surroundings.
QR codes include built-in error correction at four levels: L (7%), M (15%), Q (25%), and H (30%). Higher error correction means the code can be read even if partially damaged or obscured — this is what allows logos to be placed in the center of QR codes without breaking them.
Types of QR Codes (Static vs Dynamic)
There are two fundamental types of QR codes, and understanding the difference is critical before you create one:
Static QR Codes
A static QR code encodes data directly into the pattern of modules. The URL, text, or Wi-Fi credentials are baked into the code itself. Once generated, the content cannot be changed — you would need to create a new QR code.
- Pros: Free to create, work offline, never expire, no dependency on third-party services, complete privacy (no tracking).
- Cons: Cannot update the destination after printing, no scan analytics, longer URLs make larger (harder to scan) codes.
- Best for: Wi-Fi sharing, permanent URLs, contact cards, product labels, personal use.
Dynamic QR Codes
A dynamic QR code encodes a short redirect URL (like qr.example.com/abc123) that points to your actual destination. The redirect can be changed at any time through a management dashboard without reprinting the QR code.
- Pros: Editable destination, scan analytics (how many, when, where), shorter encoded URL means smaller QR code, A/B testing capability.
- Cons: Requires a paid service, dependent on the provider staying online, adds a redirect hop (slight latency), privacy concerns (scans are tracked).
- Best for: Marketing campaigns, business cards (where URLs may change), menus, event materials, any scenario where you might need to update the link.
Our QR Code Generator creates static QR codes — free, no tracking, no expiration. For most use cases, static codes are the right choice.
QR Code Use Cases
QR codes can encode many types of data. Here are the most common use cases with the data formats scanners recognize:
1. URLs and Websites
The most common use case. Encode any URL and scanning opens it in the browser. Always include the full URL with protocol (https://). Short URLs create smaller, more scannable QR codes.
2. Wi-Fi Network Sharing
Share Wi-Fi credentials without typing passwords. The format is:
WIFI:T:WPA;S:MyNetworkName;P:MyPassword;; // T = encryption type (WPA, WEP, or nopass) // S = network name (SSID) // P = password // H = hidden network (true/false, optional)
When a guest scans this QR code, their phone automatically connects to the Wi-Fi network. This is especially popular for cafes, hotels, Airbnbs, and home networks. No more dictating long passwords letter by letter.
3. Contact Cards (vCard)
Encode a full contact card that adds directly to the phone's address book:
BEGIN:VCARD VERSION:3.0 N:Doe;John FN:John Doe ORG:Example Inc. TEL:+1-555-123-4567 EMAIL:john@example.com URL:https://example.com END:VCARD
4. Email and SMS
Pre-fill an email with mailto:support@example.com?subject=Help&body=I need assistance or an SMS with smsto:+15551234567:Your message here. Great for customer support, feedback collection, and event RSVPs.
5. Payments
QR codes power mobile payments globally. Systems like UPI (India), Pix (Brazil), PayPay (Japan), and many others use QR codes for instant peer-to-peer and merchant payments. Even traditional payment apps like PayPal and Venmo support QR code payments.
6. Plain Text and Notes
Encode any plain text up to about 4,000 characters. Useful for sharing configuration snippets, serial numbers, or encoded data. For encoding binary data, consider using our String Encoder/Decoder to convert to a text-safe format first.
How to Create a QR Code
Creating a QR code with ToolZip's QR Code Generator takes less than 30 seconds. Here is the step-by-step process:
- 1. Choose your data type — Select URL, text, Wi-Fi, email, phone, or SMS from the input options. Each type has a specialized form that formats the data correctly.
- 2. Enter your content — Type or paste the URL, Wi-Fi credentials, or text you want to encode. For URLs, always include
https://at the beginning. - 3. Preview the QR code — The code generates in real time as you type. Check that it looks clean and the modules are distinct.
- 4. Test before printing — Always scan the QR code with your phone camera before using it. Verify it opens the correct URL or action.
- 5. Download — Export as PNG for digital use (social media, websites, presentations) or SVG for print (infinitely scalable without quality loss).
A critical tip: shorter content creates simpler QR codes that scan more reliably. If your URL is long, consider using a URL shortener first. A QR code for https://example.com has far fewer modules than one for a 200-character URL with query parameters.
QR Code Design Best Practices
A well-designed QR code is the difference between a successful scan and a frustrated user. Follow these guidelines:
Contrast and Colors
- - Dark modules on light background — This is the standard and most reliable combination. Black on white gives the highest contrast.
- - Minimum 4:1 contrast ratio — If you use brand colors, ensure the foreground is at least 4 times darker than the background. Dark blue, dark green, or dark red modules on white work well.
- - Never invert colors — White modules on a black background can confuse many scanners. If your design requires a dark background, place the QR code in a white container with padding.
- - Avoid gradients on modules — Each module should be a solid color. Gradients reduce contrast and make scanning unreliable.
Size and Quiet Zone
- - Minimum size: 2 cm x 2 cm (0.8 in) for close-range scanning (business cards, product labels).
- - Distance rule — QR code width should be at least 1/10th of the expected scanning distance. A billboard scanned from 10 meters needs a QR code at least 1 meter wide.
- - Quiet zone — Maintain at least 4 modules of blank space around the QR code. This is not optional — without it, scanners cannot distinguish the code boundary from surrounding content.
- - Use SVG for print — SVG files scale to any size without pixelation. PNG works for screen display but becomes blurry when scaled up for print.
Adding Logos
You can place a small logo in the center of a QR code thanks to error correction. Use error correction level H (30%) and keep the logo under 10% of the total QR code area. Always test the code after adding a logo — if the logo covers too many data modules, the code becomes unscannable. Round logos work better than square ones because they obscure fewer corner modules.
Troubleshooting Scanning Issues
If your QR code is not scanning, check these common causes in order:
- 1. Too small — The most common issue. Enlarge the QR code and try again. Each module needs to be large enough for the camera to distinguish it.
- 2. Low contrast — Light gray on white, or dark on dark backgrounds make scanning difficult or impossible. Increase the contrast between modules and background.
- 3. Missing quiet zone — If text, images, or borders are too close to the QR code edge, the scanner cannot find the boundary. Add at least 4 modules of white space around all sides.
- 4. Too much data — Extremely long URLs or large text blocks create dense QR codes with tiny modules. Shorten the URL or reduce the content.
- 5. Physical damage — Scratches, folds, or smudges on printed codes can exceed the error correction capacity. Reprint on a flat, clean surface.
- 6. Curved surfaces — QR codes on bottles, cups, or curved packaging can distort the pattern. Use a smaller QR code that fits on the flattest part of the surface, or increase error correction level.
- 7. Blurry print — Low-resolution printing (below 300 DPI) blurs module edges. Use SVG source files and print at 300+ DPI. Never screenshot a QR code from a screen — download the original file.
- 8. Inverted colors — Some older scanners cannot read white-on-black QR codes. Stick to the standard dark-on-light pattern.
Pro tip: Always test your QR code on at least three different phones (iOS and Android) before mass printing. Scanner apps vary in their tolerance for design modifications.
Frequently Asked Questions
Do QR codes expire?
What size should a QR code be for print?
Can I customize QR code colors?
How do I create a Wi-Fi QR code?
Create Your QR Code Now
Generate QR codes for URLs, Wi-Fi, text, and more. Download as PNG or SVG. Free, private, runs in your browser.
Open QR Code Generator