What is this?
QRCode.js is a JavaScript library for generating QR codes directly in the browser, with no backend or image API needed.
Is it a framework or just a small library?
It's a small standalone library that renders QR codes using either HTML5 Canvas or an HTML table, whichever the browser supports.
How do I add it to a page?
Include the qrcode.js script in your page, then create a 'new QRCode(element, options)' pointing at a DOM element to render the code, optionally with text, size and color options.
Do I need any other libraries or build tools to use it?
No, QRCode.js has zero dependencies, so it can be dropped into any page as a plain script.
Will it work in old or mobile browsers?
Yes, it explicitly supports a very wide range including IE6 through IE10, Chrome, Firefox, Safari, Opera, Mobile Safari, Android browser and Windows Mobile.
Where does this run — only desktop browsers?
It's purely client-side and runs on both desktop and mobile browsers, since it falls back to a table-based rendering when Canvas isn't available.
Does my data get sent anywhere to generate the QR code?
No, everything is generated locally in the browser; there's no server call or external API involved.
Can I customize the QR code's size and colors?
Yes, the options passed to the QRCode constructor let you set things like width, height, and foreground/background colors beyond just the text to encode.
Why would I use this instead of an online QR generator website?
Because it runs fully client-side with no dependencies and no network request, so QR codes can be generated offline, instantly, and without sending data to a third-party service.
What are similar projects?
masonry, oat, dragula, signature_pad, classnames, dom-to-image, skrollr, You-Dont-Need-jQuery
Which topics is it in?
client-side, vanilla-javascript, zero-dependency, qr-code, dom, no-dependencies, offline, browser, utility, html, ui, web-development
