--- title: "Barcode scanner" url: https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/zia-services/barcode-scanner/ description: "This page describes the method to use the Barcode Scanner feature to scan certain data formats in your NodeJS application with sample code snippets" last_updated: 2026-09-08T11:07:33Z service: Zia Services type: general related_links: - name: "Barcode scanner - API" url: /en/api/code-reference/zia-services/barcode-scanner/#BarcodeScanner --- # Barcode Scanner > **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/zia-services/barcode-scanner/) now. [Zia Barcode Scanner](https://docs.catalyst.zoho.com/en/zia-services/help/barcode-scanner/introduction) enables you to scan the most commonly used linear and 2D barcode formats and decode the encoded data. Barcode Scanner can detect formats like Codabar, EAN-13, ITF, UPC-A, QR Code, and more. You can provide an input file of the format ._jpg_/._jpeg_ or ._png_. Refer to the [API documentation](https://docs.catalyst.zoho.com/en/api/code-reference/zia-services/barcode-scanner/#BarcodeScanner) for the request and response formats. You can specify the barcode format using `setFormat`. If you enter the format as `ALL`, Barcode Scanner automatically detects the format. It provides the decoded information as the response. The `zia` reference used below is defined in the [component instance page.](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/zia-services/get-component-instance)The promise returned here is resolved to a JSON object. ```javascript let fs = require('fs'); zia.scanBarcode(fs.createReadStream('./barcode.png'), {format: 'code39'}) //Pass the input file and the format .then((result) => { console.log(result); }) .catch((err) => console.log(err.toString())); //Push errors to Catalyst Logs ``` A sample response that you will receive is shown below. The response is the same for both versions of Node.js. #### Node js ```json { "content": "https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html" } ```