32

I am developing an iOS Application for scanning QR Codes. I am successfully able to scan and get code from QR code.

Question:

My question is what are possible data types and format I can expect from QR Codes?

During my search on google I found QR Code can be used for

  1. Contact data
  2. Calendar data
  3. URL
  4. Email address
  5. Phone number
  6. SMS
  7. Plain text
  8. Geo location

Is this the complete list and is there same standard to represent above data in QR Codes? Means same way of generating QR Code for above QR types.

Is there any standard way of generating and representing data in QR Code?

4

3 Answers 3

66

Basically your text information has to be identifiable for what it is:

There is a very good summary here.

  1. Contact data - use MeCard, or vCard (much more verbose), e.g.: MECARD:Surname, First;ADR:123 Some St., Town, Zip Code, Country;EMAIL:some_name@some_ip.com;TEL:+11800123123;BDAY:19550231;; Gives: ExampleMeCard

  2. Calendar data - There are two formats about iCalendar (.ics) & vCalendar (.vcs). These formats can also include location, alarm, to-do items, etc. Note that these are both verbose formats and you may be better off using a short URL to an online file in the file format but the person scanning needs to have internet connectivity and be willing to trust the QR code not to be doing anything bad. Linda70th

  3. URL: Start your url with the standard format specifier such as http://, e.g.: http://stackoverflow.com/questions/19900835/qr-code-possible-data-types-or-standards Gives: ExampleUrl

  4. Email address - Start with mailto:[email protected] gives: Example Mail To

  5. Phone number - Start with tel: e.g. tel:+1-212-555-1212 gives: Example Tel No

  6. SMS - See the RFC 5724.

  7. Plain text - Just include the text. Example Text

  8. Geo location - Use the geo:lat,long,alt format URI: geo:40.71872,-73.98905,100 (100 feet above Googles offices) gives: Example Geolocation

  9. WIFI - (ssid is 'abc' and password is '1234'). For WEP encryption: WIFI:S:abc;T:WEP;P:1234;;. For WPA/WPA2: WIFI:S:abc;T:WPA;P:1234;;. Without encryption: WIFI:S:abc;T:nopass;P:1234;;. Example WIFI NoPass

All the above example were generated with the Python qrcode package from the command line.

2
  • 2
    This is what I wanted, thanks! I was not able to google it.
    – skywalker
    Nov 5, 2015 at 17:58
  • 1
    Thanks for this complete answer. Helps a lot :-)
    – sjsam
    Oct 30, 2018 at 12:17
1

Basically, QR Code returns text data that can be of any type. You can put any type of data in any string format in QR Code. It totally depends on you. You can consider it as
[NSString stringWithFormat].

2
  • 1
    thanx for your reply. As i told in my question i am making an iOS application which will take action on code received if there is no standard way of putting data in QR Code then how can I handle in my application? Please suggest Nov 11, 2013 at 7:50
  • 1
    Its totally custom as i said. If you making for your own design of barcode then you know the type and format of data. If you thinking of this for everyone then its gonna be a big deal.
    – iEngineer
    Nov 11, 2013 at 10:26
1

Github - Zxing (Barcode Contents) has a summary.

There may or may not be a standard.

If you are looking for non-standard formats,

please update your documentation and contribute to open source.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.