98

I would like to use this script https://github.com/jeromeetienne/jquery-qrcode
(or is there even a better solution?)

What I like to do is "save" some small scripts or programs and even files like xml formatted files (svg, x3d, ...) as QR code images.

But how much information (in bytes) can I save exactly to QR code images (using this javascript solution)?

Any experience with this script and using qr codes for files?
https://github.com/jeromeetienne/jquery-qrcode

2 Answers2

98

QR codes have three parameters: Datatype, size (number of 'pixels') and error correction level. How much information can be stored there also depends on these parameters. For example the lower the error correction level, the more information that can be stored, but the harder the code is to recognize for readers.

The maximum size and the lowest error correction give the following values:
Numeric only Max. 7,089 characters
Alphanumeric Max. 4,296 characters
Binary/byte Max. 2,953 characters (8-bit bytes)

Javier Buzzi
  • 6,296
  • 36
  • 50
free_easy
  • 5,061
  • 3
  • 25
  • 39
  • so it can not be greater than this actually? –  Jun 16 '12 at 18:02
  • 2
    That's whats standardized (http://www.qrcode.com/en/vertable4.html) and widely published. Maybe there is a vendor anywhere that in one way or another support bigger ones, but you can't rely on it. – free_easy Jun 16 '12 at 18:29
  • 1
    and that there is mentioned on websites that you can split larger data into 16 qr codes? how does this work? –  Jun 16 '12 at 18:36
  • how much can be stored in each version/size of a QR code? – Don Cheadle Feb 11 '15 at 15:56
  • 3
    Also note that the inappropriately named "byte mode" does not actually encode binary data. It encodes the [ISO-8995-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1) character set. This means that that 2.9kB limit is somewhat misleading, as it is only that limit if you can encode the data in ISO-8995-1. There are some surprising absences in that specification, including the new line character. Whether or not client readers will be able to decode them depends on implementation decisions regarding how closely they conform to the spec, as well as attempts at encoding detection. – user1978019 Jul 23 '15 at 16:14
  • So t's mean we can't store/save large data in QRcode like information of a database that store just texts? – Mr. ZeroOne Sep 30 '20 at 16:41
  • So storing base64-encoded data in alphanumeric QR code is more efficient (3222 bytes) than storing binary data directly? – Sebastian S Jan 23 '23 at 07:22
45

See this table.

A 101x101 QR code, with high level error correction, can hold 3248 bits, or 406 bytes. Probably not enough for any meaningful SVG/XML data.

A 177x177 grid, depending on desired level of error correction, can store between 1273 and 2953 bytes. Maybe enough to store something small.

enter image description here

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
James
  • 109,676
  • 31
  • 162
  • 175
  • 2
    read that bigger data can be split into a maximum of 16 qr codes, how does this work? –  Jun 16 '12 at 18:05
  • 8
    The linked website seems to be down. Look here for an old [snapshot from the archive.org project](https://web.archive.org/web/20160326120122/http://blog.qr4.nl/page/QR-Code-Data-Capacity.aspx) or see this [screenshot](https://i.stack.imgur.com/Lo3g3.png). – mab Jan 14 '19 at 13:26
  • @mab It's back now. – Justin Jun 17 '19 at 15:31
  • It's gone again. And the archive cache link is also not working now. – Jonathan Hall Jan 16 '20 at 08:49
  • 1
    The same content is available here: https://www.qrcode.com/en/about/version.html . Click on "31-40" for the largest "version" of QR codes. – aTotalStranger Jan 27 '20 at 18:33