Skip to content
UseQR

QR code type

JSON QR codes — how they work

A JSON QR code stores a JSON document as plain text. It is the simplest way to move structured data offline, but JSON's punctuation is expensive in a format with a 2,953-byte ceiling — expect to fit roughly 100 to 200 fields at most, and far fewer if you want a printable size.

What it is good for

Moving a small structured record between systems with no network: device configuration, an asset record, a signed claim, a test result, a machine setup. The scanner reads text and your application parses it.

JSON is expensive here

Braces, quotes, colons and commas are all bytes, and byte mode costs 8 bits per character with no compression. A modest record:

{"id":"A-1042","site":"North","cal":"2026-03-14","by":"RK"}

is 58 bytes — of which 22 are punctuation. Scale that up and the overhead dominates.

Practical ceilings at EC level M:

Payload Version Modules Sensible min print
100 bytes 6 41 × 41 2.5 cm
300 bytes 11 61 × 61 3.7 cm
800 bytes 19 93 × 93 5.6 cm
1,500 bytes 27 125 × 125 7.5 cm

Above roughly 500 bytes you are printing something that needs a deliberate scan, not a glance.

Cheaper encodings

If the data is machine-to-machine, JSON's readability buys you nothing:

  • Delimited fields: A-1042|North|2026-03-14|RK — 26 bytes instead of 58.
  • Uppercase alphanumeric: if you restrict to digits, uppercase and a few symbols, the encoder uses alphanumeric mode at 5.5 bits per character — roughly 30% smaller.
  • CBOR or MessagePack, then base32: compact binary, at the cost of readability.
  • Just a reference: put an id in the code and fetch the record over the network. Only viable if there is always a network.

Structured Append

The spec allows one logical payload to be split across up to 16 QR codes using Structured Append, which scanners reassemble. Support outside dedicated industrial scanners is poor — phone cameras generally do not implement it. Do not plan around it.

Escaping

Nothing special is needed: JSON is text, and the QR encoder is byte-transparent. Watch for characters outside ASCII, which cost more bytes in UTF-8, and for newlines, which some scanner apps collapse. Minify before encoding — pretty-printing a JSON payload can add 30% for nothing.

FAQ

How much JSON fits in a QR code?

Up to 2,953 bytes at the lowest error correction, but a payload that big produces a 177-module code needing about 9 cm of print. Under 500 bytes is the practical range for anything scanned casually.

Should I use JSON or a compact format?

If a human never reads it, use delimited fields or a binary encoding. JSON's punctuation is pure overhead in a format where every byte becomes modules.

Can I split data across multiple QR codes?

The spec supports Structured Append across up to 16 codes, but phone cameras generally do not implement it. Treat it as unavailable unless you control the scanning hardware.

Does the JSON need escaping?

No. QR encoding is byte-transparent. Just minify it, and prefer ASCII — non-ASCII characters cost extra bytes in UTF-8.

Try it — free, no signup