Demo App Try the fastest and most reliable Barcode Scanner SDK!


JavaScript Barcode Scanner SDK

Mobile Data Capture JavaScript Library

Key Requirements

web logo

Mobile Platform

  • Web Browsers with WebAssembly support
  • Android 5.0+: Chrome, Firefox, Edge
  • iOS 13.0+: Safari (Chrome and Firefox as of iOS 14.4)

For more details about WebAssembly support please refer here.


  • Rear-facing camera with autofocus (recommended)
  • Front-facing camera with autofocus‍

Development Tool

  • Any JavaScript IDE
  • Works with all common frameworks, like Angular, React, as well as Vanilla (plain) JavaScript

Distribution Channels

  • npm registry (for NodeJS based frameworks)
  • JSDELIVR (3rd party free CDN)

Test the Scanbot Barcode Scanner in our Web Demo

Web Barcode Demo QR Code

Why Scanbot SDK?

Barcode accuracy

Fast & reliable

The Scanbot Barcode Scanner scans barcodes fast and reliably, creating a flawless scanning experience

Create a prototype in hours

You can create a first prototype in just a few hours with our detailed documentation and testing projects

Slack icon

Developer support via Slack/Teams

Our developers will help you solve any problems you may encounter

No external servers

The Scanbot SDK uses on-device intelligence only, making the solution GDPR & CCPA/CAAP compliant

Enable Barcode Scanning on your website with the JavaScript Barcode Scanner

By integrating the Web Barcode Scanner, you empower your website to extract data from all standard 1D and 2D barcode types using our GDPR- and CCPA-compliant software components. Reliable & fast detection with recent smartphones, even from poor angles or under bad lighting conditions.

Decoding barcodes via a web page or web application has never been easier. A broad browser compatibility, 98.7% accurate barcode results, and direct access to the extracted data allow you to create a solution your users will love.

Looking for a cost-effective solution? With JavaScript QR Code Scanner we can help you solve business problems in any industry, along every individual process chain.

Getting Started with Scanbot JavaScript Barcode Scanner

Scanbot Web Barcode Scanner SDK is available as an npm package and also loadable via jsdelivr.

After the installation, first, you need to add a container element to your HTML file:

<div id="barcode-scanner-container"></div>

Then, you can easily start the JavaScript Barcode Scanner in your JavaScript app:

var barcodeScanner = await scanbotSDK.createBarcodeScanner({
				containerId: 'barcode-scanner-container',
				onBarcodesDetected: onBarcodesDetected,

You can configure the 1D and 2D barcode types that you want to recognize:

var barcodeScanner = await scanbotSDK.createBarcodeScanner({
	    containerId: 'barcode-scanner-container',
	    barcodeFormats: [

Also, you can customize the UI style of your JavaScript Barcode Scanner:

var barcodeScanner = await scanbotSDK.createBarcodeScanner({
	    containerId: 'barcode-scanner-container',
	    style: {
	      window: {
	        aspectRatio: 1,
	        paddingPropLeft: 0.5,
	        borderColor: "white",
	        left: "50%",
	        top: "50%",
	        transform: "translate(-50%, -50%)"
	      text: {
	        color: "white",
	        size: "0.9em",
	        weight: 300,
	      backgroundColor: "rgba(0, 0, 0, 0.7)",
	      hint: "Please align the barcode or QR code in the frame"

Complete example projects

To get off to a flying start, check out our GitHub repository. There, you can find full example projects on React, Angular, and Plain JavaScript:

They demonstrate the integration of all API methods of the Scanbot Web Document Scanner and the Barcode Scanner SDK, such as 1D and 2D barcode scanning, document scanning, the cropping UI, image filters, PDF and TIFF rendering, the MRZ (machine-readable zones) scanner, and more.

Available on all major platforms

Frequently Asked Questions

Didn’t find what you were looking for? Please refer to our FAQs.

How do I scan a barcode using JavaScript?

JavaScript-based scanning technology allows you to integrate a Barcode Scanner SDK module into your website or web application to scan barcodes with any mobile device that includes a rear camera.

How do I integrate a barcode scanner into a web app ?

Scanner SDKs allow fast and simple integration of Barcode Scanning capabilities into any website or web app. They include all necessary tools, a detailed documentation and scanning features that guarantee flawless results.

From which browsers can I scan barcodes?

You can practically scan barcodes from any browser. The Scanbot SDK currently supports scanning on any browser with WebAssembly support. For Android, these are: Chrome, Firefox & Edge, for iOS: Safari (Chrome and Firefox as of iOS 14.4).

Which platforms is the Barcode Scanner SDK currently available for?

The Scanbot Barcode Scanner SDK is suitable for native iOS or Android development, hybrid development via Xamarin & Xamarin.forms, Ionic, Cordova, Flutter, React Native, and web development via JavaScript.