QR codes appear on restaurant tables, shipping labels, event tickets, and product packaging, yet most people never think about how they actually work. Understanding the basics makes you better at creating codes that scan reliably and reading codes safely. This guide explains what a QR code is, how it stores data, how to create one, and how to scan it even when the sticker is worn or partly covered.
What a QR code actually is
QR stands for Quick Response. It is a two-dimensional barcode invented in 1994 by Denso Wave to track automotive parts, and it stores data as a grid of black and white modules rather than the parallel bars of a classic barcode. Because information runs in both directions, a QR code holds far more data: dozens of characters for a URL, several hundred for plain text, and up to a few kilobytes depending on size and error correction. Scanning hardware reads the whole grid at once, which is why the process feels instant.
The parts of a QR code
Every standard QR code contains structural elements the reader relies on:
- Finder patterns - the three large squares in the corners that let a camera locate the code and determine its angle.
- Timing patterns - alternating modules that establish the grid size so the reader knows where each row and column sits.
- Alignment pattern - a smaller square that corrects distortion on larger codes.
- Data area - the remaining modules holding the encoded payload, interleaved with error correction bits.
- Quiet zone - the blank margin around the code that scanners need for contrast.
Error correction levels
Reed-Solomon error correction lets a scanner reconstruct data even when part of the code is damaged or hidden. Higher levels add more redundancy, which makes the code more durable but also denser and slightly slower to read:
| Level | Recovery capacity | Best for |
|---|---|---|
| L | About 7 percent | Clean digital display, maximum density |
| M | About 15 percent | General purpose printing |
| Q | About 25 percent | Retail packaging, outdoor use |
| H | About 30 percent | Stickers, logos overlaid on the code |
How to create a QR code
Start by deciding the payload, which is usually a URL because links keep the code short and easy to update later. Open a QR Code Generator, paste the link or text, choose an error correction level, and set the output size to at least 300 pixels for screen use or 2 centimeters for print. Test the code with two different phones before printing anything, and keep the quiet zone clear of design elements. If you need the result inside a web app, converting the image with Image to Base64 lets you embed it directly in the markup without a separate file request.
How to scan a QR code
Modern phone cameras scan automatically: open the camera, point it at the code, and tap the notification that appears. Dedicated scanner apps handle more cases, including codes shown on another screen or heavily distorted codes. A QR Code Reader is useful when you have a saved image instead of a physical code, since it decodes a file straight from your device and shows the payload before you open any link.
When scans fail and how to fix it
- Blurry or low contrast: increase size, use pure black on pure white, and avoid glossy reflections.
- Decorative colors: keep the dark modules darker than the background by a wide margin.
- Too much content: shorten the URL, because a dense code is harder to focus on at a distance.
- Damage or overlays: raise the error correction level so the reader can rebuild hidden data.
Frequently asked questions
How much data can a QR code hold? A version 40 code with low error correction stores about 4296 numeric digits, 2953 alphanumeric characters, or roughly 2953 bytes of binary data, though large payloads are harder to scan.
Do QR codes expire? The code itself never expires. Expiration comes from the destination: a link that is taken down or a coupon whose server rejects it will fail even though the code still decodes perfectly.
Are QR codes safe to scan? Usually, but always read the decoded URL before opening it, avoid codes that redirect through unfamiliar shorteners, and never enter passwords on a page reached from a printed sticker.