JavaScript Barcode & QR Code Reader SDK for Web
On-device, offline-capable. Your barcode data stays local.
Accurately scans the toughest barcodes - damaged, curved, blurry, or low-light - in just a few lines of JavaScript. Start your free trial today.
30-day free trial
No-commitment consultation
Flexible licensing options
Start Scanning in Minutes
Add production-ready barcode scanning to any web app with easy integration. Copy the code to get started, then explore our full documentation and samples for more.
code on your phone
quickstart.html
<!doctype html>
<html>
<body>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.4.2000/dist/dbr.bundle.js"></script>
<div id="cameraViewContainer" style="width: 100%; height: 60vh"></div>
<script type="module">
let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
let view = await Dynamsoft.DCE.CameraView.createInstance();
let cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance(view);
document.querySelector("#cameraViewContainer").append(view.getUIElement());
router.setInput(cameraEnhancer);
router.addResultReceiver({
onDecodedBarcodesReceived: ({ barcodeResultItems }) => {
for (let item of barcodeResultItems) {
alert(`${item.formatString}: ${item.text}`);
}
},
});
await cameraEnhancer.open();
await router.startCapturing("ReadSingleBarcode");
</script>
</body>
</html>
Supports 30+ barcode symbologies — EAN-13/UPC-A, EAN-8/UPC-E, QR, Data Matrix, PDF417, Code 128, Code 39, and more
View all
Deep customization,
full API control.
- Full control over camera, decoding, and output behavior.
- Extensive samples and templates to jump-start development.
- 200+ APIs for every use case. View key APIs
API
What it Does
CaptureVisionRouter
Orchestrates the full capture and decode pipeline
CameraEnhancer
Opens the camera and feeds frames into the pipeline
CameraView
Renders the camera preview in the DOM
onDecodedBarcodesReceived
Callback that fires when barcodes are decoded
BarcodeResultItem
Represents a single decoded barcode — format, text, location
Proven speed & accuracy in
challenging conditions
In benchmark testing across 337 unique barcodes and 16 real-world image quality categories - including motion blur, low contrast, partial occlusion, and reflective surfaces - Dynamsoft recognized 32.7% more barcodes than the next best SDK tested.
View full benchmark resultsBarcode Detection Rate
Detection of 337 unique barcodes
Barcode Decode Speed
Average time / image - lower is better
Boost performance with customized scan templates
Templates let you tune the full decode pipeline - image preprocessing, localization, and decoding - so you get maximum accuracy for the most challenging barcodes.
30+ barcode symbologies supported
Linear, 2D, and specialty formats - including niche industrial and postal standards that most SDKs don't cover.
Linear Barcodes (1D)
Code 11
Code 39 & EXT
Code 32
Code 93
Code 128
Codabar
Interleaved 2 of 5
Matrix 2 of 5
Industrial 2 of 5
MSI (Modified Plessey)
GS1 DataBar
Telepen
UPC-A
UPC-E
EAN-8
EAN-13
2D Barcodes
QR Code
Micro QR Code
Data Matrix
PDF417
Micro PDF417
Aztec Code
MaxiCode (mode 2-5)
USPS Intelligent Mail
Postnet
Planet
Australian Post
UK Royal Mail
KIX
DotCode
Others
Patch Code
GS1 Composite Code
Pharmacode
10K+
10K+
Customers worldwide
1M+
1M+
Active users
23yrs
23yrs
Business since 2003
ISO27001
ISO27001
ISO 27001 certified
Proven strategies, real results.
Teams across manufacturing, healthcare, pharma, logistics, and retail use Dynamsoft to reduce scanning errors, accelerate integration, and meet compliance requirements.
60%
Faster client validation time
Achieving complete traceability
"Dynamsoft is key to ensuring integrity of data within our system for traceability within the manufacturing process."
60%
Reduction in returns processing costs
3.5 years bank teller time saved
"Automating the ID card capture process will save us 3.5 years of bank teller time - just on account openings."
"Dynamsoft Barcode Reader has sped up the process of receiving samples into inventory. We can now decode vials in batches of 100 with close to 100% accuracy."
2wks
The solution was ready to deploy.
30,000
Installs per month globally
"Our customers can now click-to-add enterprise-grade barcode reading to their apps."
Accurate scanning of codes with speed
Within 20 seconds, we can scan up to 180 DataMatrix barcodes with better than 99.9% accuracy.
Which browsers/versions are supported?
PlatformsChrome 78+, Firefox 68+, Edge 79+, and Safari 14+. The SDK runs via WebAssembly and works across all modern desktop and mobile browsers with no plugins required.
How does it integrate with React / Angular / Vue?
PlatformsThe SDK is framework-agnostic and integrates with any JavaScript framework. Sample projects are available for React, Angular, Vue, Next.js, Nuxt.js, Svelte, and more.
Browse the code galleryWhat's the bundle size / performance impact?
PerformanceThe core WASM module is 5‑9 MB raw (1.3‑3.6 MB gzip‑compressed). The runtime automatically selects the optimal decoding engine for the user’s environment; higher‑performance engines result in a larger binary. It loads asynchronously with no impact on initial‑page rendering. Decoding executes in a separate thread to keep your UI fully responsive.
Does any image or frame data leave the browser?
PrivacyNo. All image processing and barcode decoding happens entirely on-device. No image frames or barcode data are transmitted to any server. Only license validation communicates externally, and that contains no scan data.
Does scanning work offline?
OfflineYes — all decoding runs on-device in the browser via WebAssembly. The SDK is offline-capable once loaded. License validation requires a connection to our license server by default. An offline license option is available.
What's included in the 30-day trial?
TrialNo feature restrictions for 30 days — full SDK access, all barcode formats, and complete API functionality. Our technical support team is available throughout your trial from day one.
Start your free trialTry the barcode reader SDK free for 30 days
Full functionality, direct engineer support, no commitment.
Fully Supported Free Trial
Real engineers available on live chat throughout your 30-day trial
No Credit Card Required
Download the SDK and start building immediately. No commitment
Flexible Licensing Options
Choose a licensing model that fits your deployment and scale.
We may reach out about products and services relevant to your trial. You can unsubscribe at any time - see our privacy statement for details.