How-To Guide

How to Generate QR Codes Online: Step-by-Step Guide

Generate QR codes for URLs, text, and contact info online for free. Download as PNG. Learn when to use QR codes and best practices for print and digital.

Published 2026-03-09

Try it right now — free, no sign-up

Use the embedded tool directly in your browser. Your data never leaves your device.

Open Tool →

QR codes have become the universal bridge between physical and digital. From restaurant menus to product packaging to conference badges, they're everywhere. This guide shows you how to generate QR codes online for any use case — URL, text, contact, and more.

What Can You Encode in a QR Code?

  • URLs — Link to websites, landing pages, app stores, or any web resource
  • Plain text — Short messages, serial numbers, or identification codes
  • Email addresses — Pre-fill a mailto: link for quick contact
  • Phone numbers — Trigger a call with tel: protocol
  • SMS — Pre-populate a text message
  • vCard contacts — Business card data in a single scan
  • WiFi credentials — Join a network by scanning (WIFI:S:NetworkName;T:WPA;P:password;;)

Step-by-Step: How to Generate a QR Code Online

  1. Open the tool — Visit the QR Code Generator.
  2. Enter your content — Paste a URL or type any text to encode.
  3. Preview and verify — Scan the preview with your phone to confirm it works.
  4. Download the PNG — Save the QR code for use in your project.

Real-World Use Cases

1. Restaurant and Event Menus

# QR code content for restaurant menu
https://restaurant.com/menu

# Best practices:
# - Use a short URL or URL shortener for cleaner QR codes
# - Test scan distance: QR should scan from at least 30cm away
# - Print at minimum 2cm × 2cm (0.8in × 0.8in) for reliable scanning

2. Conference and Event Badges

# vCard format for business card QR codes
BEGIN:VCARD
VERSION:3.0
N:Johnson;Alice
FN:Alice Johnson
ORG:Acme Corp
TITLE:Senior Developer
TEL:+1-555-123-4567
EMAIL:[email protected]
URL:https://alicejohnson.dev
END:VCARD

# Encoding this as a QR code replaces printed business cards

3. WiFi Guest Network Sharing

# WiFi QR code format — guests scan to join automatically
WIFI:S:GuestNetwork;T:WPA;P:WelcomePass2026;;

# No more reading out passwords letter by letter!
# Works with iOS and Android without any app

4. Programmatic QR Code Generation

# Python: generate QR codes in bulk
import qrcode
from PIL import Image

def generate_qr(content: str, output_path: str, size: int = 300):
    qr = qrcode.QRCode(
        version=1,
        error_correction=qrcode.constants.ERROR_CORRECT_H,
        box_size=10,
        border=4,
    )
    qr.add_data(content)
    qr.make(fit=True)

    img = qr.make_image(fill_color="black", back_color="white")
    img = img.resize((size, size), Image.LANCZOS)
    img.save(output_path)

# Generate QR codes for 100 product URLs
products = [{"id": 1, "url": "https://shop.com/p/1"}, ...]
for product in products:
    generate_qr(product["url"], f"qr_{product['id']}.png")

QR Code Best Practices

  • Always test before printing — Scan with multiple devices (iOS and Android) before sending to print.
  • Use error correction level H for print — Higher error correction lets QR codes still scan even when partially obscured or worn.
  • Keep content short — Shorter URLs produce simpler QR codes that scan faster and at greater distances.
  • Use URL shorteners for tracking — A shortened URL lets you track scans and update the destination without reprinting the QR code.

Common Mistakes to Avoid

  • Printing too small — Minimum size for reliable scanning is 2cm × 2cm. Below this, low-resolution phone cameras struggle.
  • Low contrast — Always use dark QR on light background. Avoid colorful or gradient backgrounds that reduce contrast.
  • Encoding URLs that will change — If the destination URL changes, you need to reprint. Use a redirect URL you control instead.
  • No call to action — Always add "Scan to [action]" text near the QR code. People don't scan mysterious codes without context.

Related Tools

Ready to try it?

Free online tool — no download, no account, works in your browser.

Open Generate QR Codes Online: Step-by-Step Guide Tool →

Related Articles