Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QR codes Limits

I have to generate codes with custom fields: id of field+name of field+values of the field.

  1. How long is the data I can encode inside the QRcode? I need to know how many fields\values I can insert.

  2. Should I use XML or JSON or CSV? What is most generic and efficient?

like image 456
Bobo2012 Avatar asked Jul 04 '12 11:07

Bobo2012


1 Answers

XML / JSON will not qualify for a QR code's alphanumeric mode since it will include lower-case letters. You'll have to use byte mode. The max is 2,953 characters. But, the practical limit is far less -- perhaps a few hundred characters.

It is far better to encode a hyperlink to data if you can.

As Terence says, no reader will do anything with XML/JSON except show it. You need a custom reader anyway to do something useful with that data. (Which suggests this is not a good use case for QR codes.) But if you're making your own reader, you can use gzip compression to make the payload much smaller. Your reader would know to unzip it.

You might get away with something workable but this is not a good approach in general.

like image 142
Sean Owen Avatar answered Oct 08 '22 02:10

Sean Owen