QR code versions 1 to 40: grid sizes and how much data fits

A QR code's version is its grid size: version 1 is 21×21 modules, each version adds 4 modules per side, and version 40 is 177×177. You don't pick it. The encoder picks the smallest version that holds your content at the error-correction level you chose, so more data means a bigger version and smaller modules on the print.

Quick answer

What decides the version

Three things: how much you encode, which characters it uses, and the error-correction level. The QR standard (ISO/IEC 18004) stores data in one of several modes. The encoder uses the densest mode your whole content allows:

Encoding modes and what they hold
ModeCharactersVersion 1, MVersion 40, L
NumericDigits 0–9 only347,089
Alphanumeric0–9, capital A–Z, space and $ % * + - . / :204,296
ByteAnything: lowercase, punctuation, any language (as UTF-8)142,953

One lowercase letter or a ? switches the whole content to byte mode, which needs about 45% more room per character than alphanumeric (8 bits instead of 5.5). There is also a kanji mode for Japanese text (up to 1,817 characters); Qex doesn't use it.

Error correction adds redundancy so a scratched, smudged or partly covered code still scans. Each level recovers a share of damaged data: L 7%, M 15%, Q 25%, H 30%. Higher levels leave less room for content. A logo in the middle of the code covers modules, so codes with a logo use H.

Real content measured: which version it needs

Each row is encoded with the same encoder Qex uses for every download, at M without a logo and H with one.

Version needed by common content
ContentCharactersModeNo logo (M)Logo (H)
Qex short link in capitals20Alphanumeric1 (21×21)2 (25×25)
The same link in lowercase20Byte2 (25×25)3 (29×29)
Short link19Byte2 (25×25)3 (29×29)
Page link28Byte3 (29×29)4 (33×33)
Longer page link47Byte4 (33×33)6 (41×41)
Link with tracking tags64Byte5 (37×37)7 (45×45)
Shared form or document link91Byte6 (41×41)9 (53×53)
Wi-Fi network44Byte4 (33×33)5 (37×37)
Contact card (name, phone, email, company)134Byte8 (49×49)11 (61×61)

The first two rows are the same link. In capitals, HTTPS://QEX.ME/AB3XK fits alphanumeric mode and version 1; in lowercase, https://qex.me/ab3xk needs byte mode and version 2. Every Qex dynamic code holds a short link like the first row, so without a logo it stays version 1 whatever the destination. The rest are static codes, where the pattern holds the whole content. See static vs dynamic QR codes.

All 40 versions: size and capacity

At error correction M, the level Qex uses for codes without a logo. The last column is the width of one module, in millimetres, when the whole code, including its four-module clear margin, is printed 30 mm wide.

QR code versions 1–40 at error correction M
VersionGridNumericAlphanumericByteModule, mm
121×213420141.03
225×256338260.91
329×2910161420.81
433×3314990620.73
537×37202122840.67
641×412551541060.61
745×452931781220.57
849×493652211520.53
953×534322621800.49
1057×575133112130.46
1161×616043662510.43
1265×656914192870.41
1369×697964833310.39
1473×738715283620.37
1577×779916004120.35
1681×811,0826564500.34
1785×851,2127345040.32
1889×891,3468165600.31
1993×931,5009096240.30
2097×971,6009706660.29
21101×1011,7081,0357110.28
22105×1051,8721,1347790.27
23109×1092,0591,2488570.26
24113×1132,1881,3269110.25
25117×1172,3951,4519970.24
26121×1212,5441,5421,0590.23
27125×1252,7011,6371,1250.23
28129×1292,8571,7321,1900.22
29133×1333,0351,8391,2640.21
30137×1373,2891,9941,3700.21
31141×1413,4862,1131,4520.20
32145×1453,6932,2381,5380.20
33149×1493,9092,3691,6280.19
34153×1534,1342,5061,7220.19
35157×1574,3432,6321,8090.18
36161×1614,5882,7801,9110.18
37165×1654,7752,8941,9890.17
38169×1695,0393,0542,0990.17
39173×1735,3133,2202,2130.17
40177×1775,5963,3912,3310.16

Module widths are calculated, not tested minimums. To size a print, use the print-size comparison and the print checklist.

Capacity at each error-correction level

Bytes of text per version (byte mode). For links and text with lowercase letters, this is the column that applies.

Byte capacity by version and error-correction level
VersionL (7%)M (15%)Q (25%)H (30%)
11714117
232262014
353423224
478624634
5106846044
61341067458
71541228664
819215210884
923018013098
10271213151119
11321251177137
12367287203155
13425331241177
14458362258194
15520412292220
16586450322250
17644504364280
18718560394310
19792624442338
20858666482382
21929711509403
221,003779565439
231,091857611461
241,171911661511
251,273997715535
261,3671,059751593
271,4651,125805625
281,5281,190868658
291,6281,264908698
301,7321,370982742
311,8401,4521,030790
321,9521,5381,112842
332,0681,6281,168898
342,1881,7221,228958
352,3031,8091,283983
362,4311,9111,3511,051
372,5631,9891,4231,093
382,6992,0991,4991,139
392,8092,2131,5791,219
402,9532,3311,6631,273

Full tables for the other levels, every mode (level M is the table above):

Error correction L (7%): all 40 versions
QR code versions 1–40 at error correction L
VersionNumericAlphanumericByte
1412517
2774732
31277753
418711478
5255154106
6322195134
7370224154
8461279192
9552335230
10652395271
11772468321
12883535367
131,022619425
141,101667458
151,250758520
161,408854586
171,548938644
181,7251,046718
191,9031,153792
202,0611,249858
212,2321,352929
222,4091,4601,003
232,6201,5881,091
242,8121,7041,171
253,0571,8531,273
263,2831,9901,367
273,5172,1321,465
283,6692,2231,528
293,9092,3691,628
304,1582,5201,732
314,4172,6771,840
324,6862,8401,952
334,9653,0092,068
345,2533,1832,188
355,5293,3512,303
365,8363,5372,431
376,1533,7292,563
386,4793,9272,699
396,7434,0872,809
407,0894,2962,953
Error correction Q (25%): all 40 versions
QR code versions 1–40 at error correction Q
VersionNumericAlphanumericByte
1271611
2482920
3774732
41116746
51448760
617810874
720712586
8259157108
9312189130
10364221151
11427259177
12489296203
13580352241
14621376258
15703426292
16775470322
17876531364
18948574394
191,063644442
201,159702482
211,224742509
221,358823565
231,468890611
241,588963661
251,7181,041715
261,8041,094751
271,9331,172805
282,0851,263868
292,1811,322908
302,3581,429982
312,4731,4991,030
322,6701,6181,112
332,8051,7001,168
342,9491,7871,228
353,0811,8671,283
363,2441,9661,351
373,4172,0711,423
383,5992,1811,499
393,7912,2981,579
403,9932,4201,663
Error correction H (30%): all 40 versions
QR code versions 1–40 at error correction H
VersionNumericAlphanumericByte
117107
2342014
3583524
4825034
51066444
61398458
71549364
820212284
923514398
10288174119
11331200137
12374227155
13427259177
14468283194
15530321220
16602365250
17674408280
18746452310
19813493338
20919557382
21969587403
221,056640439
231,108672461
241,228744511
251,286779535
261,425864593
271,501910625
281,581958658
291,6771,016698
301,7821,080742
311,8971,150790
322,0221,226842
332,1571,307898
342,3011,394958
352,3611,431983
362,5241,5301,051
372,6251,5911,093
382,7351,6581,139
392,9271,7741,219
403,0571,8521,273

How to get a smaller version

  1. Encode a short link instead of the full address. A dynamic code holds a short redirect link, so a long destination with tracking tags still makes a small code. You can also change where it points after printing.
  2. Drop tracking tags such as ?utm_source=… from static links. In the table above they take the menu link from version 3 to version 5.
  3. Write short links in capitals when the server accepts them. Domain names are not case-sensitive; paths often are, so test first.
  4. Skip the logo if size matters: it moves the code from M to H.

Why the smallest version is worth having: the smallest QR code, and how to print it.

Questions

What is the most data a QR code can hold?

Version 40 at error correction L: 7,089 digits, 4,296 alphanumeric characters or 2,953 bytes. A byte is one character of plain English text; accented letters take two bytes and emoji four. A code that dense needs a large print to scan.

What is a version 40 QR code?

The largest QR code: 177×177 modules, holding up to 2,953 bytes at error correction L or 2,331 at M. Grid width is 17 + 4 × version, so 177×177 is version 40, 21×21 is version 1 and 25×25 is version 2. Printed 30 mm wide, a version 40 module is 0.16 mm, so it needs a large print and a close, steady camera.

How many characters fit in a version 4 QR code?

Version 4 (33×33) holds up to 62 bytes of text at error correction M, 78 at L and 34 at H. Capital letters and digits go further: 90 at M, and exactly 50 even at H.

How much fits in a version 1 QR code?

At error correction M: 34 digits, 20 capital letters and digits, or 14 bytes. That is why Qex writes its short links in capitals: HTTPS://QEX.ME/AB3XK is 20 characters, exactly the alphanumeric limit.

Can I choose the version?

Some encoders let you force a larger version, but none can fit data into a smaller one. The encoder picks the smallest version that holds your content at your error-correction level. To get a smaller code, put less in it.

Make a version 1 QR code

Free dynamic QR code · The smallest QR code · Static vs dynamic · QR code not scanning?