JavaScript API for barcode scanning based on the WebAssembly technology

Dynamsoft Barcode Reader JavaScript Edition is a JavaScript API for barcode scanning based on the WebAssembly technology. It supports real-time localization and decoding of various types of barcodes. The library is capable of scanning barcodes from a static image, and more importantly, directly from a live video stream. It supports reading multiple barcodes at a time.

Before going any further, please try the demo from a desktop browser or mobile browser to see it in action.

Barcode Scanning Online Demo

Zero Footprint

The core of Dynamsoft Barcode Reader is written in C++ for performance. We compiled the library to WebAssembly so that it can run alongside with JavaScript.

Supported Barcode Symbologies

Linear Barcodes (1D):

Include Code 39, Code 93, Code 128, Codabar, Interleaved 2 of 5, EAN-8, EAN-13, UPC-A, UPC-E, Industrial 2 of 5

2D Barcodes:

QR code, Datamatrix, PDF417 and Aztec are supported.

Supported Browser and Platform

Supported Browsers for Desktop:
Chrome v61 or up recommended
Edge v16 or up
Firefox v58 or up recommended
Safari v11 or up (could be slow)
Internet Explorer No
Supported Browsers for Mobile:
Chrome for Android v61 or up recommended
Edge slow
Firefox for Android v58 or up recommended
Safari v11 or up (could be slow)
Android Webview v61 or up recommended

Estimated Performance

Generally speaking, the performance heavily depends on the network connection, device and browser used.
Below is some preliminary data from our testing.

  • The initial load (cold cache) column lists the time spent on downloading the WASM file and compilation when a user first accesses the above demo page.
  • The subsequent visits (warm cache) column lists the time spent on page load from the second time forward.
  • The last column lists the time spent on localizing and decoding multiple barcodes off one video frame.
Device Browser Initial load (ms) Subsequent visits (ms) Average time (ms)
Win10 CPU: i7-4790 Chrome Version 70 (64-bit) 546 485 253
Win10 CPU: i7-4790 Firefox Quantum 63 (64-bit) 220 122 219
Win10 CPU: i7-4790 Microsoft Edge 42 339 112 1,778
Ubuntu: 16.0.4 Firefox Quantum 63 (64-bit) 396 238 256
Mac: 10.13.6 Safari 12 4,540 4,455 213
Mac: 10.13.6 Firefox Quantum 63 (64-bit) 290 195 272
Mac: 10.13.6 Chrome 71 (64-bit) 975 878 292
iPhone 7 Safari 11.4 6,936 5,647 387
iPhone X Safari 12.1 4,211 4,001 78
HUAWEI Mate20
CPU: Hisilicon Kirin 980
Chrome 70 4,998 3,873 234
HUAWEI Mate20
CPU: Hisilicon Kirin 980
Firefox 63 1,617 319 267
HUAWEI Nexus 6P
CPU: Qualcomm Snapdragon 810
Firefox 61 11,000 153 8,356
HUAWEI Nexus 6P
CPU: Qualcomm Snapdragon 810
Chrome 62 9,950 7,107 1,580

Overall, WebAssembly edition comes with a clear advantage: your end users don't need to install anything to use your application; Meanwhile, this relatively new technology relies on browsers a lot so the performance might be an issue, especially for the first time load. The loading performance will be improved down the road. Please contact us if you have questions choosing the right edition and would like to optimize the reading accuracy or the performance.