October 2, 2013 1:44 pm

How to decode QR code

Recently i published a tutorial on How to Generate QR Code in PHP and many readers send emails to decode QR code, so I am writing this article to decode you QR code you have to upload image of QR code and it will show you text inside that code image. This QR code decoder works on HTML 5 file API and canvas tag and used webqr library.

how-to-decode-qr-code

DOWNLOAD CODE

Include js libraries in your page where you want to decode qr codes.

HTML for page design

CSS for styling

Hope you like this tutorial feel free to comment.

Author Huzoor Bux

I am Huzoor Bux from Karachi (Pakistan). I have been working as a PHP Developer from last 5+ years, and its my passion to learn new things and implement them as a practice. Basically I am a PHP developer but now days exploring more in HTML5, CSS and jQuery libraries.


Tutorial Categories:
  • capricorn

    Its awesome…..

  • Husni’s Elemento

    thanks dude…
    it will be in my next project

  • om

    i m not allowed to download the files even after the subscription. its says you are not subscribed . i

  • r4mirezz

    same problem as om i m not allowed to download the files even after the subscription. its says you are not subscribed .

  • ernstzunehmend

    push: subscription – download – bug 😀

  • Siavash

    fantabulous code!
    My question is how can I get the location, i.e. the xy
    coordinates, of the QR section in an image. To be more precise, suppose there is
    an A4 size image with a QR-code(4cm*4cm) on top left of it. What I need is the
    exact coordinates (in pixel) of the QR-code in that image.

  • Madhav

    After subscription also , I am not able to download script….. 🙁

  • Andreas Santo

    Cool tutorial 🙂

  • Andreas Santo

    After subscription also , I am not able to download script….. 🙁

    • mabeleira

      Me too, did you get it solved?

  • sdfsdfsdf

    i m not allowed to download the files even after the subscription. its says you are not subscribed . i

  • Ramone

    Hi, is it possible to supply the image as string to a PHP based api that would then decode it?

  • Chiranjeevi Adi

    after getting the scanned text from image. whether you are storing the text somewhere if yes then tell me how you did?

  • john fritz

    what to do if i need to select pdf file.??
    Can you suggest any changes..?

  • So many error in your web bro.. you must fix it or your web can be hacked.. ^-^

  • NL Narasimhan

    Hi, QR code decoder is fantastic. I want to store the QR code output to a variable. I could not find it. Please help