Tutorial6 min read

What Is a QR Code? A Complete Guide to QR Code Generation

QR codes store URLs, contact cards, WiFi credentials, and more in a scannable square. Learn how they work, what you can encode, error correction levels, and best practices for creating QR codes that actually scan reliably.

QR codes are everywhere — on restaurant menus, product packaging, event tickets, business cards, and billboards. But most people who scan them daily have no idea what's actually encoded in those black-and-white squares, or how to create one for free. This guide covers everything you need to know.

What Does QR Stand For?

QR stands for Quick Response. The format was invented in 1994 by Masahiro Hara at Denso Wave, a Toyota subsidiary, originally designed to track automotive parts through manufacturing. The patent was filed but Denso Wave chose not to enforce it, which is why QR codes became a free, open standard.

Unlike traditional barcodes that can only hold ~20 characters in a single direction, QR codes are two-dimensional — they store data both horizontally and vertically, which is why they can hold up to 4,296 alphanumeric characters.

How a QR Code Works

A QR code is divided into several functional regions:

  • Finder patterns: The three squares in the corners. These let scanners locate and orient the code regardless of angle.
  • Timing patterns: Alternating black and white cells that help calculate the cell size.
  • Data region: The grid of cells in the center and lower-right. Each cell represents a binary value (black = 1, white = 0).
  • Error correction: QR codes embed redundant data using Reed-Solomon error correction. Even if up to 30% of the code is damaged or obscured, a scanner can still decode it correctly.

This error correction is why you can place a logo in the center of a QR code — the missing data is reconstructed automatically.

What You Can Encode in a QR Code

QR codes aren't just for URLs. Common data types:

Type Example content Common use
URL https://devzone.tools Link to website
Plain text Meeting room code: 4782 WiFi passwords, short notes
Email mailto:hi@example.com?subject=Hello Pre-filled email contact
Phone number tel:+15551234567 Click-to-call
SMS smsto:+15551234567:Your message Pre-filled SMS
WiFi credentials WIFI:S:MyNetwork;T:WPA;P:password;; Share WiFi without typing
vCard contact Full name, phone, email, address in vCard format Digital business card
Calendar event VEVENT format with date, time, location Event invitations

The scanner app on the phone reads the data and knows what to do with it based on the format prefix.

Static vs Dynamic QR Codes

Static QR codes encode the destination directly. Change the URL and you'd need to generate a new code. The advantage: they work forever with no backend, no subscription, no service dependency.

Dynamic QR codes encode a short redirect URL managed by a third-party service. Scan the code → redirect service → actual destination. This lets you change where the code points after printing it, and gives you scan analytics. The downside: you depend on the service remaining operational.

For most personal and small-business uses, static QR codes are the right choice. They're simpler, private, and have no ongoing cost.

Error Correction Levels

QR codes have four error correction levels:

Level Data recovery Best for
L (Low) Up to 7% Clean digital environments
M (Medium) Up to 15% General use — most common default
Q (Quartile) Up to 25% Industrial use, some damage expected
H (High) Up to 30% Printed codes with logos, outdoor use

Higher error correction = larger code (more redundant data). For a URL QR code on a clean white background, Level M is sufficient. If you're printing the code on a label that might get scratched, or embedding a logo in the center, use Level H.

How to Generate a QR Code for Free

DevZone's QR Code Generator creates codes that run entirely in your browser:

  1. Choose your data type — URL, text, email, phone, WiFi, or plain text.
  2. Enter the content you want to encode.
  3. Customize the size and error correction level if needed.
  4. Download as a PNG file, ready to use.

No account, no expiry, no redirect service — the code permanently encodes your data.

Best Practices for Usable QR Codes

Size matters. The minimum printable size for reliable scanning is approximately 2 cm × 2 cm (about 0.8 inches). For outdoor signage scanned from a distance, scale up significantly.

Contrast is everything. Black modules on a white background is the baseline. You can use dark colors on light backgrounds, but avoid low-contrast combinations. Never invert (white on black) without testing extensively.

Test before distributing. Use at least two different scanner apps to verify the code before printing thousands of labels or displaying it publicly.

Include a visual cue. Adding "Scan me" or a camera icon below the QR code increases scan rates by reminding people what it's for — especially on physical materials where scanning isn't the obvious action.

Leave a quiet zone. QR codes require clear white space around the perimeter (at least 4 cells wide). Placing a code edge-to-edge against other content will cause scan failures.

FAQ

Can a QR code expire?

Static QR codes — which encode data directly — never expire. They work as long as the content they point to exists. If the QR code points to a URL, the code itself is permanent, but if the website goes offline the scan will fail.

Is it free to create a QR code?

Yes. Static QR codes are a free, open standard. DevZone's QR Code Generator creates them at no cost with no account required.

How much data can a QR code hold?

The maximum is 4,296 alphanumeric characters or 7,089 numeric characters. In practice, keep encoded data short — longer data produces denser codes that are harder to scan reliably.

Can I put a logo in the center of a QR code?

Yes, thanks to error correction. Use error correction level H, which allows up to 30% data loss. Place the logo so it covers no more than 25–30% of the total code area, and test the result with multiple scanner apps before distributing.

Try the tools