How to Enable Barcode Scanning from Mobile Browsers

You got a requirement to enable web-based barcode scanning for your mobile users. You don’t want to do it via an app since it requires extra effort for both users and developers. You want to enable users to read barcodes from your website via the camera of a mobile phone or tablet. How to do that?

In this post, we will introduce how to create a solution for barcode scanning from mobile browsers using Dynamsoft Barcode Reader (DBR) SDK. Users can access the web page via their mobile browsers, capture an image or load an existing one, upload it, and then get the barcode result. Users can also read barcodes from live camera feed directly.

Supported barcodes include:

  • 1D Barcode
  • QR Code
  • DataMatrix
  • Aztec Code
  • PDF417

There are mainly two ways to decode barcodes in mobile browsers:

  • Server-Side scanning
  • Client-Side scanning.

Read Barcodes on Server Side

You can upload an image with barcodes to the server, decode the barcode content, and then return the decoded result.

The video below shows how this works:

You can open the demo URL in your mobile browser or scan the QR Code below using your mobile camera to try out the server-side barcode scanning demo: https://demo.dynamsoft.com/DBR_Mobile/MobilecamBarcodeReader.html

QR Code

Scan QR Code using your mobile camera to open our Dynamsoft Barcode Reader demo for Server-Side Decoding 

Try it yourself

Download sample code >

Get 30-day free trial >

Read Barcodes on Client Side

Our JavaScript barcode reader API based on WebAssembly technology enables you to read barcodes from live video stream within desktop and mobile browsers.

The browser compatibility is shown below:

WebAssembly browser compatibility

Image source: WebAssembly – JavaScript | MDN

You can open the demo URL in your mobile browser or scan the QR Code below using your mobile camera to try out the client-side barcode scanning demo: https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html

DBR6.4.1JS_Demo

Try it yourself

Download Sample Code>

Get 30-day free trial of JavaScript barcode SDK>

Subscribe Newsletter

Subscribe to our mailing list to get the monthly update.

Subscribename@email.com