Spec & internals
How much data fits in a QR code
Version 40 ceilings are 7,089 numeric characters, 4,296 alphanumeric or 2,953 bytes at error correction L, but codes that dense barely scan. In practice keep URLs under about 50 characters, which lands at version 4 or below at level M — a code any phone camera reads instantly.
The ceilings
At version 40 (177 × 177 modules) with error correction L, a QR code holds:
| Mode | Maximum |
|---|---|
| Numeric (digits only) | 7,089 characters |
Alphanumeric (0–9, A–Z, space, $%*+-./:) |
4,296 characters |
| Byte (anything, UTF-8) | 2,953 bytes |
The three numbers describe the same bit budget spent through different encoding modes: digits cost 3⅓ bits each, the restricted alphanumeric set 5.5, arbitrary bytes 8. Raising error correction shrinks all three — at level H the byte ceiling drops to 1,273.
These ceilings are almost never the useful answer. A version 40 symbol has 31,329 modules; printed at 5 cm its modules are 0.27 mm wide, far below what a phone camera resolves at normal distances. Capacity you cannot scan is not capacity.
What real payloads actually use
Measured against a real encoder at error correction M (byte mode):
| Payload size | Version | Modules |
|---|---|---|
| ≤ 14 bytes | 1 | 21 × 21 |
| ≤ 26 bytes | 2 | 25 × 25 |
| ≤ 42 bytes | 3 | 29 × 29 |
| ≤ 62 bytes | 4 | 33 × 33 |
| ≤ 84 bytes | 5 | 37 × 37 |
| ≤ 106 bytes | 6 | 41 × 41 |
| ≤ 213 bytes | 10 | 57 × 57 |
The full grid for every version and level is in the capacity table.
The practical rule: keep URLs under about 50 characters. That caps you at version 4, whose 33 × 33 grid scans reliably even small, dirty or at an angle. Every capacity boundary you cross adds four modules per side — the mechanics are on why longer URLs make denser codes.
The density–scannability curve
Capacity and scannability pull in opposite directions. As the payload grows, the version climbs, each module shrinks at a fixed printed size, and the camera needs to be closer, steadier and better lit. There is no cliff — just a slope that gets unpleasant somewhere around version 10 for handheld scanning of a small printed code. A 400-byte payload works fine on a full-page poster; the same payload on a 2 cm label will fail for a meaningful fraction of users.
If the payload will not shorten, grow the print. If the print cannot grow, shorten the payload — a shortened URL trades a dependency on the shortener for a much shallower code.
What does not fit
A QR code stores data, not files. You cannot embed an actual photo, PDF or app in one — 2,953 bytes is smaller than almost any file. Codes that "contain" a PDF really contain a URL to one (see PDF QR codes). The only truly self-contained payloads are short ones: WiFi credentials, contact cards, plain text, payment strings.
Check where your own payload lands with /validate, which reports the version and remaining headroom, and size the result with the size calculator.
FAQ
What is the maximum number of characters in a QR code?
7,089 numeric characters, 4,296 alphanumeric, or 2,953 bytes of arbitrary data, all at version 40 with error correction L. At the more typical level M the byte ceiling is 2,331. Codes near these limits are impractically dense for phone scanning.
How many characters should a QR code URL be?
Under about 50 characters keeps the code at version 4 or below at error correction M, which scans quickly at small sizes. Under 26 characters fits version 2 — noticeably more forgiving when the code is tiny or damaged.
Can I put a picture or PDF inside a QR code?
No. The absolute ceiling is 2,953 bytes, smaller than almost any image or document. Codes that appear to contain files actually contain a link to a file hosted elsewhere.
Does error correction reduce capacity?
Yes, substantially. Moving from L to H roughly halves usable capacity — version 40 drops from 2,953 to 1,273 bytes — because the redundancy that repairs damage is spent from the same codeword budget.
Try it — free, no signup
Related
- QR code anatomy — every region of the symbol — A labelled tour of a QR code: finder patterns, separators, timing, alignment, format and version information, the data region and the quiet zone.
- Why longer URLs make denser QR codes — QR capacity steps at fixed boundaries — 14, 26, 42, 62, 84, 106 bytes at level M — and each boundary crossed adds four modules to every side of the code.
- QR code data encoding modes — numeric, alphanumeric, byte, kanji — Numeric packs 3.33 bits per character, alphanumeric 5.5, byte 8, kanji 13. Mode choice is why HTTPS://USEQR.APP makes a smaller code than the lowercase URL.
- QR code data capacity table — The maximum a QR code can hold is 7,089 digits, 4,296 uppercase alphanumeric characters, 2,953 bytes or 1,817 kanji — all at version 40, error-correction…