GUIDE

What is inside a QR code, and how to make one that scans

What a QR code stores, why more data makes it denser, how error correction, margins, contrast and size affect scanning, and where the real risk lies.

By StillKit · Published

A QR code is a grid of dark and light squares, called modules, that stores a short piece of text. The text can be a web address, Wi-Fi details or a contact card, and the phone decides what to do with it. More text means more modules, so a long payload makes a denser code that must be printed larger. A code scans well when its content is short, it is dark on light, it keeps a clear margin and it is big enough for the distance.

A QR code holds text, and the phone decides what it means

Every QR code stores characters. A prefix at the start tells the phone what kind of content follows, and the phone offers a matching action. StillKit's QR tools write these payloads for you:

  • A web address opens in the browser. The URL QR code accepts only http and https addresses with no user name or password inside them. It writes the address in its standard form, so HTTPS://Example.com becomes https://example.com/.
  • WIFI:T:WPA;S:Guest network;P:example-password;; lets a phone join a network. The WiFi QR code puts a backslash before any ; , : " or \ in the name or password, so a network called Cafe;Guest does not break the format.
  • A contact card in the vCard 3.0 format, holding a name, phone number and email address, comes from the contact QR code.
  • mailto:, SMSTO:, tel: and geo: payloads start an email, a text message, a call or a map location. Phone numbers must be in international form, such as +94771234567. Email addresses may not contain ? & # = % or /, which could otherwise slip extra fields, such as a hidden copy recipient, into the message.
  • Anything else is plain text, which the phone shows on screen; the text QR code makes those.

Each tool shows the exact payload in its result. Read it before you print, because it is everything the code contains.

More data means a denser code

QR codes grow in steps. The smallest has 21 × 21 modules, and each larger version adds 4 modules to every side, up to 177 × 177 in the QR Code standard. StillKit picks the smallest size that fits the payload. The figures below come from its generator.

Code size for real payloads
PayloadUTF-8 bytesModules per sideError correction
tel:+947712345671621Q
https://example.com/2025Q
The Wi-Fi example above4733Q
A contact card with name, phone and email9341M
500 lowercase letters50085M
The tools' limit1,500145M

The limit counts UTF-8 bytes, not characters. English letters and digits take 1 byte each, accented letters such as é take 2, and Chinese or Japanese characters 3, so 1,500 bytes holds about 500 of those. Digits pack more tightly than letters: 20 digits fit in the smallest 21 × 21 code, while 17 lowercase letters already need 25 × 25.

For a link, the surest way to a smaller code is a shorter address. Drop tracking parameters you do not need, and link to a short page you control rather than a long search result.

Error correction lets a damaged code still scan

Part of every QR code is redundant data. The standard defines four levels: L can restore about 7% of the data, M about 15%, Q about 25% and H about 30%. A scuffed, creased or partly covered code still scans if the damage stays within that share. Higher levels need more modules for the same payload.

StillKit asks for level M. When the payload leaves spare room at the chosen size, the generator raises the level to Q or H without making the code bigger. That is why the short link in the table gets Q, and why a two-letter text such as Hi gets H. A logo pasted over the middle of a code uses up this margin, so a covered code fails sooner when it is also worn or poorly lit.

Margins, contrast and size decide whether it scans

  • Keep the quiet zone. Scanners find a code by the plain border around it. The standard asks for at least 4 modules, and StillKit's SVG includes 6 modules of white on every side. Do not crop that border or set the code on a busy photo.
  • Keep dark modules on a light background. StillKit draws black on white. Pale colors and low contrast are read less reliably, and some scanners do not read light codes on dark backgrounds at all.
  • Print it large enough for the distance. What matters is the size of one module. At the same printed width, a 145-module code has modules about a quarter the size of a 25-module code's, so long payloads need larger prints. The download is an SVG vector, so it stays sharp at any size; scale it evenly and never stretch one side.

To make a code for print:

  1. Shorten the content first: the shortest working link, or only the contact fields you need.
  2. Generate it with the matching tool and read the payload in the result.
  3. Download the SVG, named after its type, such as stillkit-url.svg, and place it in your document without trimming the white border.
  4. Print one copy at the final size and scan it with two different phones, from where people will stand and in the light where it will hang.

A code is not safe or unsafe; its destination can be

A QR code only carries text. The phone's scanner decides what to do with it and usually shows the address before opening it, so the risk lies in where that text points. People cannot read a code by eye, which makes codes useful for phishing. Someone can also stick a new code over a genuine one on a poster, a parking meter or a restaurant table.

  • Read the address your phone shows before you open it, and stop if the domain is not the one you expect.
  • Be wary of codes that lead straight to a payment or sign-in page, and look for stickers placed over public codes.
  • Treat a Wi-Fi code as the password itself. The password sits in the code as plain text, so anyone who can photograph the code can read it. Use one for a guest network rather than your main one.

StillKit's codes are static: the payload is written into the pattern itself, with no redirect in between. StillKit has no way to count your scans, and a printed code cannot be edited. To keep the option of changing the destination, point the code at a page you control and change that page instead.

TRY IT YOURSELF

Tools used in this guide

Find your next shortcut

Search loads only when needed. Your search stays on your device.

Browse all categories and sections →