--- title: "Facial Comparison" url: https://docs.catalyst.zoho.com/en/sdk/javascript/v1/zia-services/identity-scanner/facial-comparisson/ 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: "Java SDK Documentation" url: /en/sdk/java/v1/zia-services/identity-scanner/facial-comparison/ - name: "Python SDK Documentation" url: /en/sdk/python/v1/zia-services/identity-scanner/facial-comparison/ - name: "REST API Documentation" url: /en/api/code-reference/zia-services/identity-scanner/facial-comparison/#FacialComparison repository: name: "Repository" url: https://github.com/catalystbyzoho/zcatalyst-sdk-js --- # Facial Comparison > **Notes:** * 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. * Catalyst does not store any of the files you upload in its systems. The documents you upload are used for one-time processing only. They are not used for ML model training purposes either. Catalyst components are fully compliant with all applicable data protection and privacy laws. * While the Document Processing feature of Identity Scanner is only relevant to Indian users, the [Facial Comparison API](https://docs.catalyst.zoho.com/en/api/code-reference/zia-services/identity-scanner/facial-comparison/#FacialComparison) and SDK tools are available to a global audience. However, accessing and testing Facial Comparison or E-KYC from the Catalyst console is restricted to the users from IN DC alone. [Facial Comparison](https://docs.catalyst.zoho.com/en/zia-services/help/identity-scanner/key-concepts/#facial-comparison-process), also known as E-KYC, is a part of Identity Scanner that compares two faces in two different images to determine if they are the same individual. This will enable you to verify an individual’s identity from their ID proof by comparing it with an existing photo of theirs. For example, you can verify the authenticity of a photo ID, such as an individual’s Aadhaar card, by comparing it with their current photograph. > **Note:** You can mark either the ID proof image or the individual's photograph as the source or the query image. This will not affect the results. You can perform a face comparison between a source image and a query image, by specifying the path to both the image files, as shown in the sample code. The `compareFace()` method processes both these images. **Allowed file formats**: .webp, .jpeg, .png **File size limit**: 10 MB The result of the comparison is set to `true` if the faces match, or `false` if they don’t match. The result also contains a confidence score between the range of 0 to 1, that determines the accuracy of the processing. Only if the comparison yields a confidence score of above 50% i.e., 0.5, the result will be set to `true`. 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 sourceImage = fs.createReadStream('/Users/amelia-421/Desktop/source.webp'); // specify the file path const queryImage = fs.createReadStream('/Users/amelia-421/Desktop/query.webp'); // specify the file path const res = await zia.compareFace(sourceImage, queryImage); console.log(res); ``` #### Example of Expected Response A sample response that you will receive is shown below. ```json { "confidence": 0.9464, "matched": "true" } ```