Aadhaar Masking API
Mask the first eight digits of an Aadhaar number in a document image, returning a redacted copy that is compliant to store.

What the Aadhaar Masking API does
Aadhaar Masking takes an image containing an Aadhaar number and returns the same image with the first eight digits obscured, leaving only the last four visible.
UIDAI guidance and data protection practice both discourage storing full Aadhaar numbers without a specific lawful basis. Masking at the point of capture means your archive never holds the full number, which is a far stronger position than deleting it later.
Where teams use the Aadhaar Masking API
Redacting Aadhaar copies before storing them
Meeting UIDAI expectations on Aadhaar handling
Sharing identity documents with third parties safely
Retrofitting masking across an existing document archive
Frequently Asked Questions (FAQs)
Which digits remain visible?
The last four, which is the standard masked form and enough to reference the document without exposing the full number.
Can the masking be reversed?
No. The returned image is redacted, not overlaid, so the original digits are not recoverable from it.
Should I mask before or after extraction?
Extract first if you need the number for verification, then store only the masked copy. Never persist the unmasked image without a lawful basis.
Related APIs
- KYC Document Classifier API Automatically identify whether an uploaded document is an Aadhaar, PAN, passport, voter ID or driving licence before extraction.
- Super OCR API Classify and extract any supported Indian KYC document in one call, covering Aadhaar, PAN, licence, passport, voter ID and utility bills.
- OCR Aadhaar API Extract the Aadhaar number, name, date of birth, gender and address from a photo of an Aadhaar card, ready for identity verification.
- Bank Passbook OCR API Pull the account number, IFSC, branch and account holder name out of a bank passbook image as structured data, ready to verify without manual entry.
Start verifying with the Aadhaar Masking API
Book a walkthrough and we will show the call, the response and how it fits your onboarding flow.
- One API key for every check
- Verified against official Indian records
- Built for onboarding at scale
