How to make a QR code
- Pick what the code should doURL opens a web page, Text shows a short message on the phone, and Wi-Fi joins a network without typing the password.
- Type or paste the contentThe preview updates as you type. For links you can leave out https://; it is added for you, and the exact address being encoded is shown under the box.
- Choose colors, size and error correctionDark on light scans best. Level M suits most uses; pick Q or H for codes that will be printed outdoors or partly covered.
- Test it, then downloadPoint your phone camera at the preview before you print anything. Save a PNG for everyday use or an SVG for sharp printing at any size.
What is inside a QR code
A QR code is a square grid of modules, each one dark or light. The smallest code, version 1, is 21 × 21 modules, and every version adds four modules per side, up to version 40 at 177 × 177. The generator always picks the smallest version that fits your content at the chosen error correction level, which is why the grid size shown above the preview jumps as you type.
Much of the grid is not your data. The three large squares in the corners are finder patterns: they let a camera spot the code and work out its angle from any direction. Lines of alternating modules between them, the timing patterns, give the scanner the grid spacing, and from version 2 onwards smaller alignment squares help it cope with a code on a curved or tilted surface. Short strips beside the finders record the error correction level and the mask, a pattern laid over the data to break up large solid or empty patches that confuse cameras. The rest holds your content plus Reed–Solomon error correction, the same family of codes that let scratched CDs keep playing.
Content is packed in the most compact mode that fits. Digits alone take about 3.3 bits each, capital letters and a few symbols about 5.5 bits, and everything else, including lowercase letters, a full 8 bits, or two to four bytes for accented letters and non-Latin scripts. A 20-digit number fits in the smallest version 1 grid, while a 20-letter lowercase sentence already needs version 2.
How content length changes the code
We measured the codes this page produces for typical content. Each cell is the grid size in modules, before the quiet zone is added.
| Content | Level L | Level M | Level Q | Level H |
|---|---|---|---|---|
| Short link (19 chars) | 25 × 25 | 25 × 25 | 25 × 25 | 29 × 29 |
| Link with path (41) | 29 × 29 | 29 × 29 | 33 × 33 | 37 × 37 |
| Wi-Fi, 12-char password | 29 × 29 | 29 × 29 | 33 × 33 | 37 × 37 |
| Long link (100) | 37 × 37 | 41 × 41 | 49 × 49 | 57 × 57 |
| Text, 300 chars | 61 × 61 | 69 × 69 | 81 × 81 | 89 × 89 |
| Text, 1,000 chars | 105 × 105 | 121 × 121 | 141 × 141 | 161 × 161 |
These numbers decide what survives printing. On a 3 cm code, a 29 × 29 grid plus its quiet zone gives modules about 0.8 mm wide, which any phone camera resolves at arm’s length. The 1,000-character text at level M squeezes 129 modules into the same 3 cm, about 0.23 mm each: finer than ink spread on cheap paper and too small for many cameras to focus on. If a code has to stay small, shorten the content first. A link to a page holding the long text scans far more reliably than the text itself.
Static vs dynamic QR codes
A static code, the kind this page makes, stores your content directly in the pattern. A phone reads the address and opens it, with no service in between and no account that can lapse.
A dynamic code stores a short link on the generator company’s server instead, which then forwards each scan to your real address. That detour lets the company count scans and lets you change the destination later. It also means every scan is recorded by a third party, usually with the time, rough location and type of phone, and the code only works while that company keeps the redirect running.
This is why so many “free” generators end up with codes that stop working. The code is free, the redirect is a trial, and after a couple of weeks the printed menus and flyers point to a page asking for a subscription.
Limits worth knowing
A static code cannot be edited or counted, so a typo means a reprint, and the only scan numbers you get are visits to your own website. Anything in the code is readable by anyone who scans it, so never encode a discount code or a password you would not print in plain text. Finally, the code depends on your domain: if you let a domain expire, whoever registers it next receives every scan of your old flyers.
Printing: size, distance and contrast
The rule of thumb is 10 to 1: a code can be scanned from about ten times its own width. A 3 cm code works at arm’s length; a poster read from across a room needs one closer to 20 cm. The rule assumes a short link of around 25 to 33 modules, so scale up for the denser codes in the table above.
| Where it goes | Scanned from | Minimum width |
|---|---|---|
| Business card, label | 20–30 cm | 2–3 cm (about 1 in) |
| Flyer, menu, table card | 30–50 cm | 3–5 cm |
| Poster | 1–2 m | 10–20 cm |
| Shop window, sign | 3–5 m | 30–50 cm |
Keep the quiet zone
The plain border around the code, called the quiet zone, tells the camera where the code starts. The QR standard asks for at least four modules on every side. Downloads from this page include it, so do not crop it away, and do not place the code tight against a busy photo or pattern.
Colors that scan
Phones look for dark modules on a light background. Brand colors are fine as long as the contrast stays strong: aim for a ratio of 4:1 or more, which the tool shows next to the colors. Avoid light codes on dark backgrounds, since some scanners cannot read inverted codes, and prefer matte paper, because glare on glossy stock can wash out part of the pattern.
Error correction and logos
Error correction adds spare data so a code still reads when part of it is scratched, dirty or covered. Level L can rebuild about 7% of the pattern, M 15%, Q 25% and H 30%. Higher levels need more modules, so the code gets denser. If you plan to put a logo in the middle in a design program, use level H, keep the logo under about a fifth of the code’s area, never cover the three corner squares, and test with several phones before printing.
Wi-Fi codes: handy, but think about who can see them
A Wi-Fi code holds the network name, the security type and the password as plain text, in a format such as WIFI:T:WPA;S:Home;P:secret;;. Semicolons, commas, colons, quotes and backslashes inside the name or password are escaped with a backslash, and a name or password made only of hex digits, such as ABCD1234, is wrapped in double quotes so scanners do not decode it as raw bytes. This page does both for you. The built-in camera of most phones made in recent years recognises the format and offers to join the network, so guests never have to spell out a long password.
That convenience cuts both ways. Anyone who can photograph the code can read the password with any scanner app, so treat the printout exactly like the password written on paper. Use a guest network where your router offers one, keep codes for your main network out of view of visitors and passers-by, and print a new code whenever you change the password. The network name must match exactly, including capital letters and spaces. Workplace networks that ask for a username as well as a password cannot be shared this way, because phones do not reliably support those fields in the code.
Questions
Do these QR codes expire?
No. The link, text or network details are stored in the black-and-white pattern itself, so the code keeps working for as long as the printout lasts. The only thing that can break it is the destination: if the web page it points to is taken down, the code will open a dead link.
Can a QR code dial a number, start an email or send a text?
Yes. In URL mode, type tel:+15551234567 to offer a call, mailto:[email protected] to open a new email, or sms:+15551234567 to start a text message. These addresses are kept exactly as typed instead of getting https:// added, and the phone asks before it dials or sends anything.
Should I download PNG or SVG?
PNG works everywhere: documents, slides, messages and most print shops. SVG is a vector file that stays perfectly sharp at any size, which makes it the better choice for designers, large signs and professional printing. When in doubt, pick PNG at 1024 px.
Why won’t my phone scan the code?
The usual causes are low contrast, light modules on a dark background, a missing white border, or a code printed too small for the distance. Glossy paper that reflects light and very long text that makes the pattern dense also hurt. Try the default colors, keep the margin and print it larger.
Does a code work on a screen as well as on paper?
Yes, with two caveats. A code on a projected slide has to follow the same 10 to 1 distance rule as a poster, so one filling a corner of the slide will not reach the back row. On phones and monitors, turn the brightness up and avoid a dark theme that inverts the colors of embedded images.
Can I use these codes on products and in ads?
Yes. The QR format is an open international standard with no licence fee for printing codes, and the images made here carry no watermark and need no credit. You own the file you download and can use it on packaging, menus, business cards or advertising.
Guides
- Static vs Dynamic QR Codes: Expiry, Tracking and When Each Makes SenseA static QR code stores your content directly; a dynamic one stores a redirect link. Why dynamic codes expire or get paywalled, and when each type is right.
- How Big Should a QR Code Be? Print Size, Scan Distance and ContrastThe 10:1 scan distance rule, the four-module quiet zone, how content length sets the QR version, and module sizes when printing at 2, 3 and 5 cm wide.