Blog

How QR Codes Actually Encode Your Link

Published August 2026 · Updated September 2026 · Toolsyy Team

A QR code is not a picture of a link. It is the link, written in a grid, with enough redundancy built in to survive a coffee ring. Toolsyy’s QR Code Generator builds one in your browser and hands you a PNG. Knowing what is actually in that grid tells you why some codes are dense and fragile and others are chunky and reliable — and that difference is mostly under your control.

Static or dynamic: the choice that decides everything else

This is the distinction that matters most and it is almost never explained on the page where you generate a code.

A static code — what this tool makes — has your destination encoded directly in the pattern. Nothing sits in between. It cannot expire, cannot be switched off, and nobody counts the scans, because there is no server in the path to count them. It also cannot be changed: the address is part of the image, so a new destination means a new code and a reprint.

A dynamic code encodes a short link belonging to a marketing platform, which redirects to wherever you currently point it. That buys you the ability to re-point a code after it is printed, and it is genuinely useful for a poster campaign. The price is that your code now depends on that company staying in business and keeping you subscribed, and every scan is logged by them. Restaurant menus that stopped working are usually dynamic codes whose subscription lapsed.

Neither is better in the abstract. If the destination will never change — a wifi network, a contact card, your homepage — static is strictly safer. If it might, the dependency may be worth accepting knowingly.

The grid has modes, and your capitalisation picks one

Here is the part that surprises people. QR codes do not store text one way. The specification defines several modes, and the encoder picks the most compact one your data allows:

  • Numeric — digits only, about 3.33 bits per character
  • Alphanumeric — digits, uppercase letters, space and a few symbols, at 5.5 bits per character
  • Byte — anything else, including any lowercase letter, at 8 bits per character

Alphanumeric mode has no lowercase letters in it at all. So a single lowercase character anywhere in your string forces the entire segment into byte mode, at eight bits per character instead of five and a half. The effect on the finished code is visible:

https://toolsyy.dev            -> byte mode,         version 2, 25x25
HTTPS://TOOLSYY.DEV            -> alphanumeric mode, version 1, 21x21

https://toolsyy.dev/tools/qr-code  -> byte mode,     version 3, 29x29
HTTPS://TOOLSYY.DEV/TOOLS/QR-CODE  -> alphanumeric,  version 2, 25x25

A version 1 code has 21 modules across; a version 3 has 29. Printed at the same physical size, the version 1 code has noticeably larger squares, and larger squares are what a phone camera needs in poor light or at an angle. Capitalising the URL made the code easier to scan without shortening it.

The caveat you must not skip. This is only safe for the scheme and the domain, which are case-insensitive by specification — HTTPS://TOOLSYY.DEV and https://toolsyy.dev reach the same server. The path after the domain is case-sensitive on most servers. Uppercasing /tools/qr-code into /TOOLS/QR-CODE will often produce a 404. Uppercase the host if you like; leave the path exactly as it is, and test the code before you print a thousand of them.

The same logic is why a code holding only digits is so compact, and why the wifi example on the tool encodes as two segments — an alphanumeric run for the structural part and a byte run for the network name and password, which can contain anything.

Error correction is why a logo works, and it is not free

Every QR code carries redundant data so a scanner can reconstruct parts it cannot read. There are four levels, and they trade capacity for damage tolerance:

  • L — recovers about 7%
  • M — about 15% (the level this tool uses)
  • Q — about 25%
  • H — about 30%

That redundancy is what lets a centred logo work at all: the scanner treats the covered modules as damage and rebuilds them. It is also what lets a code survive a fold, a smudge or a bad print.

What is less obvious is that raising the level makes the grid denser, because the recovery data has to go somewhere. The same URL encoded at each level:

L -> version 3, 29x29
M -> version 3, 29x29
Q -> version 4, 33x33
H -> version 4, 33x33

So a high-correction code is more robust per module and has smaller modules — two effects pulling against each other. Medium is the sensible default for a printed code of reasonable size, which is why it is the one used here. If you plan to cover part of the code with a logo, spend your budget deliberately and keep the obstruction well under the recoverable share.

How much actually fits

At the medium level used here, the absolute ceilings are:

  • 2,331 bytes of ordinary mixed-case text
  • 3,391 characters of uppercase alphanumeric
  • 5,596 digits

At the lowest correction level those rise to 2,953, 4,296 and 7,089 respectively — the specification’s hard maxima. They are also entirely theoretical for anything printed. A code near that ceiling is a 177 by 177 grid of hair-thin modules that a phone will struggle with on paper. Treat the real limit as a scanning limit, not a storage one, and encode a short URL rather than a document.

Printing it so it actually scans

Three things account for most codes that fail in the field:

  • Too small for the data. About 2cm square is the floor for a handheld scan of a simple code, and a dense one needs more. Scale with both the reading distance and the version.
  • Not enough quiet zone. The blank margin is part of the specification, not decoration — it is how the scanner finds the edges. The PNG from this tool carries two modules of margin and the specification asks for four, so place it with white space around it and never crop tight against the pattern.
  • Inverted or low contrast. Most scanners expect dark modules on a light background. A light-on-dark code, or a code printed in a pale brand colour on grey, may work on one phone and fail on the next.

And test the artefact you are actually shipping. A code that scans off your monitor tells you almost nothing about the same code printed at 15mm on matte stock under a restaurant’s lighting.

FAQ

Will this QR code expire?

No. The destination is encoded in the pattern itself, so the code does not depend on this site or any other service continuing to exist. It works for as long as whatever it points to works. Codes that expire are dynamic ones, which encode a short link owned by a marketing platform rather than your actual destination.

Why does an uppercase URL produce a simpler QR code?

QR codes have several encoding modes, and the alphanumeric mode packs two characters into 11 bits but only covers digits, uppercase letters and a handful of symbols. A lowercase letter forces the denser byte mode at 8 bits per character. Writing HTTPS://TOOLSYY.DEV instead of the lowercase form drops the grid from 25 by 25 modules to 21 by 21, because the whole string then fits the compact mode.

Can I put a logo in the middle of a QR code?

Usually yes, because every code carries error correction that can rebuild data the scanner cannot read. This generator uses the default medium level, which recovers about 15 percent of the code, so a small centred logo normally still scans. Keep it well under that share of the area and test the printed result, since the correction budget also absorbs print defects, glare and creasing.

How much data fits in one QR code?

At the medium error correction level used here the ceiling is about 2,331 bytes of ordinary text, 3,391 characters of uppercase alphanumeric, or 5,596 digits. Those are absolute maxima that produce a very dense grid needing a good camera. In practice keep it short: the less you encode, the larger each module is at a given print size, and the more reliably it scans.

How small can I print a QR code?

About 2cm square is a sensible minimum for a handheld scan, larger for a poster read from further away, and larger again if the encoded text is long, because more data means a denser grid. Leave clear white space around it as well. The downloaded PNG includes a margin of two modules, and the specification asks for four, so give it room rather than cropping tight.

Related guides

Try it now: Free QR Code Generator

Tools from this guide

QR Code Generator Turn any link or text into a scannable code.