QR Code Generating with Vanilla JavaScript | qrjs2

Generate QR Code using Vanilla JS that allows you to create customizable QR codes using SVG, PNG, and HTML table elements.

javascript qr code generator with logo, qr code generator github, html qr code generator, qr code algorithm javascript, browser qr code generator, jquery qr code generator

How to make use of it:


$ npm install qrjs2

# Bower
$ bower install qrjs2

Insert the principle JavaScript file qrjs2.js into the doc and also you’re able to go.

<script src="qrjs2.js"></script>

Generate an SVG-based mostly QR code inside your div component.

var svgElement = document.createElement("div"),
u = "",
s = QRCode.generateSVG(u, {
    //options here

Generate an SVG  QR code with Data URIs and PNG fallback.

if (document.implementation.hasFeature("http://www.w3.org/2000/svg","1.1")) {
  var dataUriSvgImage = document.createElement("img"),
  u = "https://github.com",
  s = QRCode.generateSVG(u, {
      // options here
  var XMLS = new XMLSerializer();
  s = XMLS.serializeToString(s);
  s = "data:image/svg+xml;base64," + window.btoa(unescape(encodeURIComponent(s)));
  dataUriSvgImage.src = s;
var dataUriPngImage = document.createElement("img"),
u = "https://github.com",
s = QRCode.generatePNG(u, {
    // options here
dataUriPngImage.src = s;

Generate an HTML table-based QR code.

var htmlTable = document.createElement("div"),
u = "",
s = QRCode.generateHTML(u, {
    // options here

All default choices to customize the QR codes.

// 'L', 'M', 'Q' and 'H'
ecclevel: "M",

// fill color
fillcolor: "#FFFFFF",

// text color
textcolor: "#373737",

// margin size
margin: 4,

// module size
modulesize: 8

Customizable QR Code Generator, qrjs2 Plugin/Github, javascript qr code generator svg, jquery qr code generator codepen

See Demo And Download

Official Website(englishextra): Click Here

This superior jQuery/javascript plugin is developed by englishextra. For extra advanced usage, please go to the official website.

Related Posts


Responsive Drag and Drop File Uploader/Download Plugin | 5x5_jq_uploader

5x5_jq_uploader plugin can be used to instantly create a drop file area and file queue with a little bit of preparation. Bootstrap is used for responsive planning…


Stylesheet For Implementing Dark Mode with Bootstrap

Bootstrap Dark Mode provides a style sheet and two texts that allow you to implement Dark Mode on your website. Initially loaded based on user preferences, can…


Multi-purpose Navigation Menu for Javascript Library | jQuery Corenav

coreNavigation is a multipurpose navigation menu for a jquery based javascript library, comes with more style, and is easy to integrate. 11 Default Menu 2 Responsive Navigation…


Simple Multi-Select Dropdown Pure Vanilla Javascript | multiSelect.js

MultiSelect.js is a simple, clean, and progressive JavaScript library designed for easy integration with any type of project or system. The design was heavily influenced by the…


Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…


How To Create A Popup in HTML with CSS

How to create popup in html with css – Popup without JavaScript is an elegant pop-up panel component with an animated scale, written in CSS. Have you…