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.
| Level | Recovery capacity | Best 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
Tips for Reliable Scanning
Frequently Asked Questions
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.
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.
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.
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.
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.