JavaScript Barcode Scanner SDK
Mobile Data Capture JavaScript Library
Get Started
Key Requirements
Mobile Platform
- Web Browsers with WebAssembly support
- Android 5.0+: Chrome, Firefox, Edge
- iOS 14.5+: Safari, Chrome, and Firefox
Devices
- Rear-facing camera with autofocus (recommended)
- Front-facing camera with autofocus
Distribution Channels
- npm registry (for NodeJS based frameworks)
- JSDelivr (3rd party free CDN)
Development Tools
- Any JavaScript IDE
- Works with all common frameworks, like Angular, React, as well as Vanilla (plain) JavaScript
WebAssembly Support
- For more details about WebAssembly support please refer here
Why Scanbot SDK?
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 example projects
Developer support via Slack/Teams
Our developers will help you solve any problems you may encounter
100% offline
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 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 the JavaScript QR Code Scanner we can help you solve business problems in any industry, along every individual process chain.
Learn more about our range of features
Multi-Scanning
Barcode Filter
AR Overlay
Batch Scanning
A reliable Barcode Scanner SDK covering a wide range of codes
Whether your app is used by your employees or your customers: You want it to work quickly and reliably. That’s why our Barcode Scanner SDK uses computer vision algorithms and machine learning models to guarantee lightning-fast and accurate barcode detection.
Its coverage of barcode symbologies is one of the widest out there. With the Scanbot Barcode Scanner SDK, you can solve business problems in any industry, automate workflows, and optimize your internal processes.
1D Symbologies
Learn more about our 1D Barcode Scanner2D Symbologies
Learn more about our 2D Barcode ScannerGetting Started with the Scanbot JavaScript Barcode Scanner
The Scanbot Web Barcode Scanner SDK is available as an npm package and can also be loaded 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: [
"AZTEC",
"CODABAR",
"CODE_39",
"CODE_93",
"CODE_128",
"DATA_MATRIX",
"EAN_8",
"EAN_13",
"ITF",
"MAXICODE",
"PDF_417",
"QR_CODE",
"RSS_14",
"RSS_EXPANDED",
"UPC_A",
"UPC_E",
"UPC_EAN_EXTENSION",
"MSI_PLESSEY",
]
});
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.
The example projects 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.
Learn more about our scanning solutions
See all resourcesBarcode Scanning
BrochureLearn everything you need to know about Barcode Scanning with Scanbot SDK
Learn More
iOS & Android: A 100% customized scanning experience based on the Scanbot SDK
Read Story
Licensing Model
Getting StartedLimitless scanning without volume-based variables
Learn More
Frequently Asked Questions
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.