QR Code Generator

The Complete QR Code Guide

How a QR code actually stores data, what the error correction levels trade off, common uses, and tips for a code that scans cleanly every time.

Open Tool

What Is a QR Code and How Does It Encode Data?

A QR (Quick Response) code is a two-dimensional barcode made up of a grid of black and white squares called modules. Unlike a traditional 1D barcode, which only holds a short numeric string readable in one direction, a QR code encodes data across both axes of the grid, letting it pack in far more information in the same footprint.

Three large squares in the corners - the finder patterns - let a scanner instantly detect the code and work out its orientation and size, even at an angle. The rest of the grid encodes the actual data plus built-in error correction data, generated using Reed-Solomon codes, so the code can still be read correctly even if part of it is damaged, dirty, or covered.

Error Correction Levels - What They Trade Off

Every QR code trades data capacity against damage tolerance. Raising the error correction level dedicates more of the grid to redundant recovery data, which means the code can survive more physical damage, dirt, or a logo overlay - but it leaves less room for your actual text, or forces the code to a larger grid size to fit the same content.

LevelRecovery capacityBest for
L - Low~7%Maximum data capacity, clean digital display only
M - Medium~15%General-purpose default - a good balance for most uses
Q - Quartile~25%Printed materials that may pick up wear or dirt
H - High~30%Small prints, outdoor use, or codes with a logo overlay

Common Use Cases

Share Links & WifiPoint people straight to a website, a profile, a contact card, or share your wifi password without anyone typing a thing.
Contact InfoEncode a vCard so scanning the code adds a contact directly to someone's phone.
Event TicketsEncode a ticket or booking reference for fast, contactless check-in at events, venues, and boarding gates.
Marketing & PrintAdd a scannable link to flyers, posters, packaging, and business cards to bridge print media straight to the web.

Tips for Reliable Scanning

Leave a quiet zoneKeep a clear blank margin around the code at least as wide as a few modules - a scanner uses that margin to distinguish the code from its surroundings.
Use high contrastStick to dark modules on a light background; low-contrast color combinations make the finder patterns harder for a camera to lock onto.
Size for the distanceA code scanned from a few feet away (like a poster) needs to be printed noticeably larger than one scanned up close (like a business card).
Raise error correction for printUse Quartile or High error correction on anything printed, handled, or displayed outdoors, since those surfaces are more likely to pick up damage or glare.

Frequently Asked Questions

What do the smaller dotted lines and squares inside a QR code do?

Besides the three large finder patterns in the corners, a QR code has alternating dark/light timing patterns running between them that help a scanner count the exact number of rows and columns, plus smaller alignment patterns scattered through larger codes that let the scanner correct for distortion when the code is viewed at an angle. A narrow strip of format and version information bits near the top-left finder pattern also tells the scanner which error-correction level and mask pattern were used, so it can undo the masking before reading the actual data.

Why does this tool try 8 different mask patterns before picking one?

Masking XORs the raw data bits against one of eight fixed patterns to break up large blocks of same-colored modules, avoid accidental look-alikes of the finder patterns, and keep the ratio of dark to light modules balanced - all things that make scanning less reliable if left unchecked. This tool scores all eight standard patterns against those penalty rules from the QR spec and keeps whichever one comes out with the lowest penalty score before rendering the final code.

Can two QR codes that encode the same text look completely different?

Yes. Encoding the same text at a different QR version or error-correction level changes the grid size and how much of it is redundancy, and even at identical settings the mask-selection step can land on a different one of the eight patterns depending on the data. All of these produce a visually different module pattern that still decodes to the exact same text, so two different-looking codes for the same link are completely normal.

Why won't my QR code scan?

The most common causes are too little quiet zone (blank margin) around the code, low contrast between the modules and background, or a code printed too small for the scanning distance - leave a clear margin, use dark-on-light colors, and size the code for how far away it will be scanned.

How much data can a QR code hold?

This tool builds QR codes up to version 10 (a 57x57 module grid), which comfortably covers real-world use: at version 10 with Low error correction, that's roughly 650 numeric digits, 395 alphanumeric characters, or about 270 bytes of raw text - far more than a URL, wifi credential, or short message needs. The full QR standard goes up to version 40 and can hold several times that, but this generator intentionally stops well before that point, since a code that dense also becomes much harder to scan reliably at normal print sizes.

Open Tool