DOCUMENT AI API · DATA MASKING

Mask Aadhaar, PAN and other sensitive data in documents.

A hosted data masking API that automatically detects sensitive PII — Aadhaar numbers, PAN and other identifiers — and redacts them while preserving document layout exactly. Returns a masked document plus an audit-ready count of every redaction, for fintech KYC, banking, insurance, and any workflow that archives or shares sensitive documents.

Auto-detect & redact PII Layout-preserving output Audit-ready redaction counts
WHAT IT DOES

Compliance-grade PII redaction

  • ✓ Detects Aadhaar numbers, PAN, and other sensitive fields
  • ✓ Handles Aadhaar QR codes and barcode regions
  • ✓ Layout-preserving output, only detected regions redacted
  • ✓ Works on scanned cards, eKYC PDFs, KYC bundles
  • ✓ Multi-page documents, every page processed
  • ✓ Audit-ready: count of redactions per document returned
python
result = client.data_masking.redact(
    file="customer_kyc_pack.pdf"
)

print(result.masked_pdf_url)
print(result.redactions_count)
# 7 sensitive fields redacted across 4 pages
WHAT IT DETECTS

Sensitive fields, found and masked automatically

Aadhaar numbers

12-digit Aadhaar number patterns detected and masked so stored copies don't expose the number.

PAN

Permanent Account Number fields detected and masked wherever they appear in the document.

QR codes & barcodes

Aadhaar QR code and barcode regions redacted so the number can't leak through a machine-readable code.

Other sensitive fields

Additional sensitive identifiers detected and masked, leaving the name, photo, and layout intact.

USE CASES

Where teams use Data Masking

CKYC archive

Redact sensitive fields before archiving customer KYC bundles for compliance retention.

Loan + onboarding workflows

Fintech and lending, mask Aadhaar and PAN in stored KYC files while keeping document evidence intact.

Insurance claim archives

Mask sensitive data in claim documentation packages before sharing with auditors or TPAs.

Customer support evidence

Show customer KYC documents in support tickets with sensitive fields masked.

Data-sharing with partners

Share verified KYC documents with partners or aggregators without exposing Aadhaar or PAN.

Training data preparation

Strip sensitive identifiers from documents before using them as training data for downstream models.

FAQ

Common questions

What does the Data Masking API do?
It automatically detects sensitive personal data in a document and redacts it, returning a masked copy. It finds identifiers such as Aadhaar numbers and PAN along with Aadhaar QR code and barcode regions, then masks only those areas so the rest of the document stays exactly as it was. It is a hosted API built for India KYC workflows in fintech, banking, and insurance.
Which types of sensitive data can it detect and redact?
It detects and redacts sensitive identifiers such as Aadhaar numbers, PAN, and other sensitive fields in a document. Aadhaar detection covers both 12-digit number patterns and Aadhaar QR code and barcode regions. Only the detected regions are masked, leaving the rest of the document intact.
Is the Aadhaar masking UIDAI-compliant?
It masks the Aadhaar number so stored and shared copies don't expose it in full, in line with UIDAI guidance on handling Aadhaar documents. This matters for any workflow that retains Aadhaar documents, such as CKYC archives and loan onboarding files.
Does it preserve the document layout after redaction?
Yes. The output is layout-preserving, so the name, photo, and overall document structure stay intact and only the detected sensitive regions are masked. This keeps the document usable as evidence while removing the sensitive identifier.
Can it mask sensitive data across multi-page PDFs and KYC bundles?
Yes. It processes multi-page documents and redacts sensitive fields on every page. It works on scanned cards, eKYC PDFs, and combined KYC bundles, returning a single masked document.
Does it detect Aadhaar numbers inside QR codes and barcodes?
Yes. Alongside plain 12-digit Aadhaar number patterns, it detects Aadhaar QR code and barcode regions and redacts them too. This prevents the Aadhaar number from leaking through a machine-readable code even when the printed number is masked.
How do I verify how many fields were redacted?
Each response returns the count of redactions found in the document, so results are audit-ready. For example, a request can report that 7 sensitive fields were redacted across 4 pages. You can log this count for compliance records.
Is there a free trial, and how is it priced?
Yes. You can upload a sample document and see the redaction result before committing, via the free trial. For pricing and licensing details, see the pricing page or contact the team.
THE FULL TOOLKIT

Explore the rest of the Document AI API

One wallet, every capability — take this and you also get all of these.

Try Data Masking with the free trial

Upload a sample document and see the redaction quality before you commit.