JavaScript API for barcode scanning based on the WebAssembly technology

Dynamsoft Barcode Reader JavaScript Edition (preview) 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 68 1,500 1,350 172
Win10 CPU: i7-4790 Firefox 61 2850 80 150
Win10 CPU: i7-4790 Edge 42 420 200 433
Ubuntu: 16.0.4 Firefox 61 5,594 116 250
Mac: 10.13.6 Safari 11.1.2 3,605 3,201 153
Mac: 10.13.6 Firefox 61 3,185 111 187
iPhone 7 Safari 11.4.1 7,514 6,921 251
HUAWEI Nexus 6P Android Firefox 61 9,935 682 1,312
HUAWEI Nexus 6P Android Chrome 62 7,568 7,125 1,573

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.