正在加载,请稍候…

QR Code Generator: Create QR Codes for URLs, Text, and WiFi

Learn how to generate QR codes for websites, plain text, and WiFi credentials. Covers QR code structure, error correction levels, and best practices for print and digital use.

What Is a QR Code?

A QR code (Quick Response code) is a two-dimensional barcode that encodes data as a grid of black and white squares. Originally developed by Denso Wave in 1994 for tracking automotive parts, QR codes became ubiquitous after smartphones gained built-in camera scanning. Today they appear on restaurant menus, product packaging, business cards, event tickets, and payment terminals worldwide.

Unlike a 1D barcode that stores only ~20 numeric characters, a single QR code can hold up to 4,296 alphanumeric characters or 7,089 numeric characters — enough for a full URL, a vCard contact, or a WiFi password.

QR Code Structure Explained

Finder Patterns

The three square patterns in the corners let scanners detect the code's position and orientation. Even if the code is rotated, skewed, or photographed at an angle, the finder patterns allow the decoder to reorient and read it correctly.

Timing Patterns

Alternating black and white modules running between the finder patterns establish a coordinate grid. They let the decoder calculate module size and account for any distortion.

Data Modules

The bulk of the QR code. Encoded using Reed-Solomon error correction, meaning the data is redundant — a partially damaged or obscured code can still be read.

Quiet Zone

The blank white border surrounding the code. Without enough quiet zone, scanners may fail to detect the boundaries. Standard requirement is 4 modules of white space on all sides.

Error Correction Levels

QR codes include built-in redundancy so they can survive physical damage, dirt, or design overlays:

Level Recovers from Typical use
L (Low) ~7% damage Clean digital displays
M (Medium) ~15% damage Most general uses
Q (Quartile) ~25% damage Industrial environments
H (High) ~30% damage Logo overlay, printed materials

Higher error correction increases the code's density (more modules = larger or denser code). For most URLs, M level offers a good balance between scan reliability and code size.

What Data Can a QR Code Store?

URLs

The most common use case. Encode any HTTPS URL. Keep URLs short — shorter URLs produce less dense codes that scan more reliably at small sizes.

https://myutl.com/json-format

Plain Text

Encode instructions, addresses, or notes that don't require internet access to read.

WiFi Credentials

A special format lets phones join a network without typing a password:

WIFI:T:WPA;S:MyNetworkName;P:MyPassword;;

Scan this with iOS 11+ or Android 10+ to connect instantly. No app needed.

Contact Information (vCard)

A standardized vCard QR code lets people add your contact details with one scan:

BEGIN:VCARD
VERSION:3.0
N:Smith;John;;;
FN:John Smith
ORG:Acme Inc.
TEL:+1-555-0100
EMAIL:john@example.com
END:VCARD

Email and SMS

Pre-fill an email or SMS for easy one-tap actions:

mailto:support@example.com?subject=Help%20Request
sms:+15550100?body=Hello

Best Practices for Print

Minimum size: 2 cm × 2 cm for codes scanned from arm's length. Larger for billboards or codes scanned from greater distances.

Color contrast: Dark modules on a light background. Avoid low-contrast color combinations. The scanner looks for a 4:1 contrast ratio minimum.

Testing before printing: Print a test copy at actual size and scan it with multiple devices before sending to the printer.

Avoid placing text inside the quiet zone: Surrounding text must not intrude on the 4-module border.

Use H-level error correction with logos: If you embed a logo or icon over the center of the QR code, the logo covers some modules. High error correction compensates.

Best Practices for Digital Use

On screens, QR codes are typically shown for people to scan with their phone. Considerations differ from print:

  • Brightness and glare from the display can make scanning difficult — provide adequate contrast settings
  • Animation or transitions behind the code interfere with scanning; keep the background static
  • On small phone screens, show QR codes at full width or provide a "save image" option

QR Code vs Barcode: When to Use Which

Feature QR Code 1D Barcode
Data capacity Up to 4,296 chars ~20 chars
Scan direction Any angle Must align
Damage tolerance Yes (error correction) No
Common uses URLs, payments, menus Retail products, logistics
Requires app No (modern phones) Sometimes

Use a standard 1D barcode for retail products where scanner infrastructure already expects it. Use QR codes for everything else — especially consumer-facing content where the user brings their own phone.

Generate QR Codes Instantly

→ Use the QR Code Generator to create a QR code for any URL or text, with customizable foreground and background colors.

→ For WiFi networks specifically, the WiFi QR Code Generator creates properly formatted WiFi QR codes that work with iOS and Android native camera apps.