Versions: the content decides the grid
QR codes come in 40 sizes called versions. Version 1 is a grid of 21 × 21 modules (the black and white squares), and every version adds four modules to each side, up to 177 × 177 for version 40. You do not pick the version here: the qrcode library chooses the smallest one that holds your content at the error correction level you selected.
Longer content means a denser grid. https://example.org/menu is 24 bytes and comes out as version 2, 25 × 25 modules, at the Medium level. Add three utm tracking parameters and the same address grows to 83 bytes and version 5, 37 × 37. At a fixed print size every extra module makes each square smaller, so a short link scans more easily than a long one.
What kind of characters you use matters
The QR standard has four encoding modes: numeric, alphanumeric (capital letters, digits and a handful of symbols), byte and kanji. At version 40 with level L, the maximum is 7,089 digits, 4,296 alphanumeric characters, 2,953 bytes or 1,817 kanji. Anything outside the alphanumeric set, including lowercase letters, accented letters and emoji, goes in byte mode as UTF-8.
The difference shows in real codes. A thousand digits fit in version 16 (81 modules) at Medium, while a thousand lowercase letters need version 26 (121 modules). Because alphanumeric mode has no lowercase, HTTPS://EXAMPLE.ORG/MENU in capitals fits version 1 at level L, where the lowercase address needs version 2. Domain names ignore case but many paths do not, so test a capitalised link before you print it. Mixed text such as a Wi-Fi string is split into segments, each in the cheapest mode that fits.
Error correction: Low, Medium or High
Every QR code carries Reed–Solomon error correction, so a smudged or torn code can still be read. The standard defines four levels: L restores about 7% of the codewords, M about 15%, Q about 25% and H about 30%. This tool offers L, M and H; Q is not available. DENSO WAVE, the company that created QR codes, notes that M is the level most often chosen.
Recovery costs space. The 1,000-byte maximum this tool accepts becomes version 22 (105 modules) at L, version 26 (121) at M and version 36 (161) at H. For a code shown on a screen or printed large on clean paper, L or M is plenty; for an outdoor sticker, a flyer that will be folded, or anything that may get scuffed, H is the safer pick.
Why a logo can push the code up several versions
A word or picture in the middle hides the modules under it, so the tool switches to H whenever you add one. There is a second effect. Versions 7 to 13 have a small alignment pattern at the exact centre, which scanners use to correct for tilt and curvature. Covering it hurts more than the recovery level makes up for, so the tool moves such codes up to version 14 or above, where the middle box can sit between the alignment patterns.
Take the 83-byte tracking link again. At H alone it is version 8, 49 modules a side. Put a single letter K in the middle and it becomes version 14, 73 modules, with a centre box 15 modules wide. In a 512 px PNG each module shrinks to about 6.3 px, so if you add a logo to a long link, choose the next size up.
Working out the print size
- 1Module size in the saved PNG is image width ÷ (modules + 2 × margin). Version 2 (25 modules) with a 4-module margin at 512 px gives 512 ÷ 33 ≈ 15.5 px per module; at 256 px it is about 7.8 px.
- 2The specification calls for a blank quiet zone four modules wide on every side. The Narrow margin here is one module, so use it only where the surroundings are already blank.
- 3DENSO WAVE’s own example: printing each module as 4 dots on a 400 dpi printer gives 0.254 mm modules, so a version 3 code (29 modules) is 7.366 mm across, or 9.398 mm with the margin.
- 4A poster read from across a room needs much larger modules than a business card. Whatever the use, print one copy at full size and scan it with two or three different phones before ordering a batch.