JQuery HTML5 QR Code Scanner using Instascan JS Example
Are you looking for qr code scanner script using jquery html5? If yes then i will defiantly help to create simple example for qr code or barcode reader using webcam or mobile camera. we will use instascan js plugin for qr code scan.
Instascan JS is a real-time webcam-driven HTML5 QR code scanner. Instascan JS wil help to find all camera attach with your system or mobile and you can read barcode using anyone that you want.
So, basically, you have to copy bellow html code and run in your system. Then i also attach qr code for demo. So let's see.
Index.html
<!DOCTYPE html>
<html>
<head>
<title>JQuery HTML5 QR Code Scanner using Instascan JS Example - ItSolutionStuff.com</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://rawgit.com/schmich/instascan-builds/master/instascan.min.js"></script>
</head>
<body>
<h1>JQuery HTML5 QR Code Scanner using Instascan JS Example - ItSolutionStuff.com</h1>
<video id="preview"></video>
<script type="text/javascript">
let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
scanner.addListener('scan', function (content) {
alert(content);
});
Instascan.Camera.getCameras().then(function (cameras) {
if (cameras.length > 0) {
scanner.start(cameras[0]);
} else {
console.error('No cameras found.');
}
}).catch(function (e) {
console.error(e);
});
</script>
</body>
</html>
You can also check this qr code:
I hope it can help you....

Hardik Savani
I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- Bootstrap star rating example using bootstrap-star-rating plugin
- jQuery Ajax X-editable bootstrap plugin to update records in PHP Example
- Laravel - Ajax crop image before upload using using croppie plugin
- Bootstrap multiselect dropdown in popup using popupMultiSelect plugin
- Laravel notification alert using bootstrap notify plugin example
- Simple Example of Bootstrap Lightbox Plugin with demo
- Jquery - Timepicker with AM PM Example code with demo using jQuery Timepicker Plugin