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.
Device Browser Build Time (ms) Average Decoding Time (ms)
Win10 CPU: i7-6700 Chrome Version 72.0.3626.121
(Official Build) (64-bit)
88 220
Win10 CPU: i7-6700 Firefox Quantum 65.0.2 (64-bit) 291 233
Win10 CPU: i7-6700 Microsoft Edge 44.17763.1.0 27 270
Ubuntu: 18.0.4 Firefox Quantum 65.0.2 (64-bit) 125 317
Mac: 10.14.2 Safari 12.0.2 2,023 295
Mac: 10.14.2 Firefox Quantum 64 (64-bit) 64 309
Mac: 10.14.2 Chrome Version 72.0.3626.119
(Official Build) (64-bit)
276 335
iPhone 6 Safari 12.1.4 3,415 560
iPhone 6 Plus Safari 12.1.4 3,432 586
iPhone 7 Safari 12.1.2 1,599 349
iPhone X Safari 12.1.4 928 231
iPhone XR Safari 12.1.2 853 245
Samsung sm-c7100 (Galaxy C8) Chrome 68 1,764 1,326
Samsung SM-T560 (Galaxy Tab E) Firefox 65.0.1 560 2,569
Samsung (Galaxy J2) Firefox 65.0.1 683 2,761

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.