A QR code is one of those technologies that looks trivial and turns out to have real depth. Generate one carelessly and it might scan fine on your phone in good light, then fail completely on a printed flyer under a fluorescent bulb. The difference between a code that always works and one that frustrates people comes down to a handful of decisions you make when you create it.

What a QR code actually stores

A QR (Quick Response) code is a two-dimensional barcode that encodes data as a grid of black and white modules. It can hold a URL, plain text, contact details, Wi-Fi credentials, an email address with a pre-filled subject, a phone number, and more. The most common use by far is a URL: the code is just a compact, camera-friendly way to type a web address for someone. The amount of data you encode affects the density of the grid — a short URL produces a sparse, easy-to-scan code, while cramming in a long string makes the modules small and harder for cameras to resolve.

Error correction: the most important setting

QR codes have built-in redundancy using Reed–Solomon error correction. This is what lets a code still scan when part of it is dirty, damaged, or covered. You choose how much redundancy to include, and the choice is a genuine trade-off: