File & Image5 min read

QR Codes Explained: How They Work and Best Practices

Everything about QR codes — how they store data, error correction levels, size recommendations, and best practices for generating QR codes that scan reliably.

What is a QR Code?

A QR code (Quick Response code) is a two-dimensional barcode that can store various types of data — URLs, text, contact information, WiFi credentials, and more. QR codes can be read by smartphones, tablets, and dedicated scanners in any orientation.

How QR Codes Store Data

QR codes store data in a matrix of black and white squares. The data is encoded using Reed-Solomon error correction, which allows the code to be read even if part of it is damaged or obscured.

Error Correction Levels

LevelNameRecovery CapacityUse Case
LLow7%Clean environments, digital displays
MMedium15%General use (default)
QQuartile25%Industrial environments
HHigh30%Printed materials, damaged surfaces

Data Types You Can Encode

TypeFormatExample
URLPlain URLhttps://freeutil.app
Plain textPlain textHello World
Emailmailto:mailto:hello@example.com
Phonetel:tel:+6612345678
SMSsmsto:smsto:+6612345678:Hello
WiFiWIFI:WIFI:T:WPA;S:MyNetwork;P:password;;
ContactvCardBEGIN:VCARD...

Best Practices

  • Size: Minimum 2x2 cm for print; larger for farther scanning distances
  • Contrast: Dark code on light background — avoid colors that reduce contrast
  • Quiet zone: Keep a white border (at least 4 modules wide) around the code
  • Test before printing: Always test with multiple devices before printing at scale
  • Short URLs: Use URL shorteners for long URLs — shorter data = simpler, more scannable code
  • Error correction: Use Level H when adding a logo in the center

✓ Adding a logo to the center of a QR code is fine — use error correction Level H which allows up to 30% of the code to be obscured. Keep the logo area under 25% of the total QR code area.

TRY THE FREE TOOL

QR Code Generator

Generate QR codes for URLs, text, and more

Open Tool →
N

Nattapon Tonapan

Developer & creator of FreeUtil. Building free tools for developers and Thai users.

About the author →

RELATED ARTICLES

File & Image6 min read

Image Compression Guide: Reduce File Size Without Losing Quality

File & Image5 min read

Favicon Guide: Sizes, Formats, and How to Add One to Your Website

File & Image6 min read

PNG vs JPG vs WebP: Which Image Format Should You Use?

← Back to all articles