Emoji Experience a fast & reliable Barcode Scanning SDK with our new Demo App! Test it! Our new Barcode Scanning Demo App:
Experience a fast & reliable Barcode Scanning SDK!

JavaScript Barcode Scanner

Mobile Data Capture JavaScript Library

Try the SDK in your project

Enable Barcode Scanning on your website with the JavaScript Barcode Scanner

By integrating the Web Page 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.

Barcode icon

All common formats

User guidance icon

User Guidance

Icon Scan

Scan multiple codes

Update now icon

1-day integration

Speed icon

Fast & reliable

Would you like to know more about our pricing?

Get in touch with us and receive more pricing details within a day.

Receive your pricing
Lady placing coin inside piggybank

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: https://github.com/doo/scanbot-sdk-example-web/

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.