--- title: "Barcode Scanner" url: https://docs.catalyst.zoho.com/en/sdk/javascript/v1/zia-services/barcode-scanner/ description: "This page describes the method to perform operations using the components in Zia Services." last_updated: 2026-09-09T10:45:38Z service: Zia Services type: general related_links: - name: "Catalyst Zia Services" url: /en/zia-services/ - name: "Object Recognition Help Documentation" url: /en/zia-services/help/object-recognition/introduction/ - name: "Java SDK Documentation" url: /en/sdk/java/v1/zia-services/barcode-scanner/ - name: "Python SDK Documentation" url: /en/sdk/python/v1/zia-services/barcode-scanner/ - name: "REST API Documentation" url: /en/api/code-reference/zia-services/barcode-scanner/#BarcodeScanner repository: name: "Repository" url: https://github.com/catalystbyzoho/zcatalyst-sdk-js --- # Barcode Scanner > **Note:** Ensure you have installed the [required package](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/zia-services/overview/#prerequisites) to use this SDK method. [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`, the Barcode Scanner automatically detects the format. It provides the decoded information as the response. The `zia` reference used in the code snippets below is the [component instance](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/zia-services/get-zia-instance/) created to perform these operations. The promise returned here is resolved to a JSON object. ```javascript const fs = require('fs'); const result = await zia.scanBarcode(fs.createReadStream('./barcode.png'), {format: 'code39'}); //Pass the input file and the format console.log(result); ``` #### Example of Expected Response A sample response that you will receive is shown below. ```json { "content": "https://demo.dynamsoft.com/dbr_wasm/barcode_reader_javascript.html" } ```