GUIDE · UPDATED 2026
How much data fits in a QR code, and how many a file needs
The largest QR code holds 2,953 bytes. A one-megabyte file is therefore a few hundred codes, not one. Below are the exact figures, and what decides how fast a screen can pass them to a camera.
Written by Taha Bayar, a biologist working on laboratory data handover. Kionel sends files as sequences of codes; the capacities come from the QR standard (ISO/IEC 18004), the rest from the code the app runs.
Bytes per code
A QR code's size is its version, from 1 to 40; each step adds four modules (the small squares) to each side. Each version has four error-correction levels, L, M, Q and H, and the higher ones spend more of the code on repair data. For arbitrary bytes at level L:
| Version | Modules | Bytes at level L |
|---|---|---|
| 10 | 57 × 57 | 271 |
| 15 | 77 × 77 | 520 |
| 20 | 97 × 97 | 858 |
| 25 | 117 × 117 | 1,273 |
| 27 | 125 × 125 | 1,465 |
| 30 | 137 × 137 | 1,732 |
| 35 | 157 × 157 | 2,306 |
| 40 | 177 × 177 | 2,953 |
At version 40, level M holds 2,331 bytes, Q 1,663 and H 1,273.
Why a screen uses level L
A printed code on a crate gets scratched and dirty, and level H lets a reader recover it with up to about 30% of it damaged. A code on a monitor is never torn; the risk is a missed or blurred image. So Kionel uses level L, the most data per image, and deals with missed images differently: a fountain code. The sender keeps producing fresh combinations of the file's pieces, and the receiver rebuilds the file from any set slightly larger than the file itself — whichever images it happened to catch. Nothing has to be sent again on request.
How many codes a file needs
Kionel puts a 20-byte header on every code (session, position, checksum), so a version-27 code carries 1,445 bytes of the file and a version-40 code 2,933. With 1 KB = 1,024 bytes:
| File size | Version 27 codes | Version 40 codes |
|---|---|---|
| 10 KB | 8 | 4 |
| 100 KB | 71 | 35 |
| 1 MB | 726 | 358 |
| 5 MB | 3,629 | 1,788 |
These are minimums: the receiver has to catch that many different images. Allow about 10% more for the fountain code.
Compress first, then encrypt
Encrypted data looks random and does not compress, so the order matters. Kionel compresses the file before encrypting it and sends whichever version is smaller. Plain-text exports (CSV, TXT, XML) usually shrink a lot. JPEG, PNG, ZIP, XLSX and most PDFs are compressed already and barely change.
What limits the speed
Showing codes is easy. Reading them is the bottleneck.
- Reading live. The receiving camera decodes images as they arrive. Kionel shows version-27 codes 30 times a second for this; a denser code needs a sharper image, and the camera reads fewer of them.
- Recording. The receiving device films the screen and Kionel reads the video afterwards, frame by frame. Here Kionel shows version-40 codes 20 times a second: most phones record 30 frames a second, and at 60 codes a second most frames catch two codes blended together.
- Colour code. Images that use colour instead of black and white (from the open-source libcimbar project) carry about 2,770 bytes each and are shown 15 times a second, for recording.
Actual speed depends on the camera, the screen and the distance. Kionel shows its estimate for your file before you start, and for recording it tells the receiving device how long to film.