Search code examples
htmlbrowserqr-code

Is it possible to convert an HTML file into QR code?


I have an HTML file that I wanted to convert into a QR code so that when a user scans it the website will load up (the website does not have a domain it is just an HTML file). I wanted the QR code scanner to treat it as a website and run it on the browser.

PS. The user shouldn't have the HTML file, the file shall be sent to the user and temporarily stored inside the phone's ram after scanning it.

Is it possible? And how do I do it?


Solution

  • There are multiple options that you can explore for distributing your HTML. You don't necessarily need a domain. All you need it a hosting service. You can use e.g.: Amazon's S3.

    You can explore from among following options:

    1. any blob storage (e.g.: s3)
    2. gitHub Pages (https://pages.github.com/)
    3. heroku (free)

    Once you have a URL that renders your HTML, it's just a matter of creating a QR code using your URL as the input.

    For that, you can look into numerous free QR code generators online. E.g.: https://me-qr.com