FormatFlow

No tool matches “”

Try a format (“webp”, “mp3”) or a verb (“merge”, “compress”).

Loading index

↵to open

use-cases · 5 min read

QR codes explained: how they work and when to use one

A QR code encodes text as a grid of dark and light modules, with position markers that let a camera find and straighten the pattern. The payload can be a website address, Wi-Fi credentials, an email draft, a contact card or plain text.

Most scanning failures are mechanical: too small, too low contrast, no quiet zone, or the wrong error-correction level. Most security problems come from opening the destination without checking it first.

By FormatFlow EditorialUpdated October 19, 2026More Developer Tools →

What is actually inside a QR code

A QR code is made of modules, finder patterns in three corners, timing patterns that mark the grid, alignment patterns on larger versions, and format information that tells a scanner which error-correction level and mask are in use. The payload is encoded together with Reed-Solomon error-correction data, so damage or a missing section can be reconstructed up to a point.

There are 40 sizes, called versions, and four data modes: numeric, alphanumeric, byte and Kanji. Byte mode carries UTF-8 text, which is what URLs and most real payloads use. Capacity depends on the version, the mode and the error-correction level; the largest version at the lowest error correction can hold roughly 2,950 bytes, while realistic marketing codes stay far below that.

Error correction: redundancy you pay for

The four levels recover different amounts of damaged data: L about 7 percent, M about 15 percent, Q about 25 percent and H about 30 percent. Higher recovery means more redundant codewords, which leaves less room for the payload and produces a denser code at the same physical size.

M is a sensible default for ordinary screen and print use. Choose H when the code will be small, curved, applied to a rough surface, exposed to weather, or has a logo placed over its centre. Choose L when you need maximum capacity and the surface is clean and well controlled.

The encoder picks the smallest version that fits, so adding one long tracking parameter can push the code into a denser version with smaller modules. That is another reason to keep the payload short and stable rather than packing every campaign variable into the code itself.

Payloads people actually use

A URL payload should include its scheme, such as https://, so the scanner opens it as a link rather than searching for the text. Wi-Fi codes use a compact format with fields for the network name, password, security type and hidden status. Email codes use a mailto: address with optional subject and body, and phone codes use tel:.

The payload is baked into the pattern. A static code cannot be edited after it is printed, so plan for the content to be final: a short, stable URL is far more robust than a long tracking URL that may change.

Security and static versus dynamic codes

Scanning a QR code only reads data; the risk is what the data does. Look at the preview most camera apps show before opening a link, check the domain, and be suspicious of codes stuck over existing ones on posters, parking meters or restaurant tables. Avoid entering a password or payment detail on a page you reached from an unknown code.

Never put a secret in a code you will print or share publicly. A Wi-Fi password inside a code is readable by anyone who scans it, and a code that encodes an admin URL is effectively an unlisted key. Dynamic QR services can change the destination and count scans, which is convenient for campaigns but adds a dependency, a subscription and a privacy cost because the redirect sees every scan.

A QR code is also the wrong tool when the content is long, sensitive or still changing. A plain printed URL is easier for people who cannot use a camera, a longer message belongs on a page the code points to, and a password belongs in a password manager rather than on a printed square. If the code has to serve everyone, print the destination in text next to it.

Frequently asked questions

How much data can a QR code hold?
The largest version at the lowest error-correction level holds about 2,950 bytes in byte mode. Capacity drops quickly as the error-correction level rises and as the data moves from numeric to byte mode, so a long URL or a paragraph of text fits, but a whole document does not.
Which error-correction level should I choose for a QR code?
Medium is the usual default because it balances capacity and resilience. Use High when the code is small, curved, covered by a logo or likely to be damaged, and Low only when you need the maximum payload and can control the surface and lighting.
How large should a printed QR code be?
As a rule of thumb, make the code about one tenth of the distance from which it will be scanned, with roughly two centimeters as a minimum for a phone held close. Test the actual print with more than one phone before running a large batch.
Are QR codes safe to scan?
The pattern itself is just data and cannot run code, but the destination can be malicious. Preview the URL before opening it, avoid codes pasted over existing ones in public places, and never enter credentials or payment details after following a code you did not expect.
Can I change a QR code's destination after it is printed?
Not with a static code: the destination is part of the pattern, so you must generate and print a new one. Dynamic QR services work through a redirect that can be edited later, but they usually require a subscription, and every scan passes through the provider.

Tools for this job

All Developer Tools