How to Mask Aadhaar and Redact PDFs Properly
Hotels, landlords, gyms, SIM card shops and courier services ask for a copy of your Aadhaar or other ID far more often than they actually need the full number. Bank statements you share for a loan or a visa show account numbers and every transaction. Hiding the parts that are none of the recipient's business is sensible, but the most common way people try to do it does not work.
Why a black rectangle is not redaction
When you open a PDF in a viewer or editor and draw a filled black shape over a number, the shape is added as a new layer on top. The text underneath is still in the file. Anyone who receives it can:
- Select the area and copy the text, then paste it elsewhere.
- Use the viewer's search to find the number.
- Open the file in an editor and move or delete the black box.
The same applies to highlighting in black, and to some "redact" features that only add an annotation. This is not a theoretical problem: there have been many well-publicised cases of court filings and government documents released with "redacted" text still extractable.
True redaction removes the underlying content, not just covers it.
For Aadhaar: use masked Aadhaar
UIDAI offers a masked Aadhaar option. When you download your e-Aadhaar from the official myAadhaar portal, you can choose a masked version, in which the first eight digits of the number are replaced with "xxxx-xxxx" and only the last four are visible. UIDAI encourages using masked Aadhaar where the full number is not required. Hotels and many service providers generally do not need the full number.
Two practical notes:
- The downloaded e-Aadhaar PDF is password-protected. The password format is described on the download page (it has been a combination of letters of your name and your year of birth; check the current instructions).
- Some services, such as bank KYC or government benefits, do legitimately require the full number. Masking is for situations where it is not needed.
If you only have a scan or photo of your Aadhaar card, downloading a masked copy from UIDAI is cleaner than editing the scan yourself.
Redacting text in a PDF
For PDFs with real text, such as bank statements, salary slips, e-Aadhaar, offer letters and invoices, use a tool that finds the text and removes it.
- Open Redact PDF and add the file.
- Pick the pattern groups you need. India IDs covers Aadhaar numbers, PAN, Voter ID, driving licence, Indian passport numbers, UPI IDs and IFSC codes. Bank Details includes Indian account numbers. Contact Info includes email addresses and Indian mobile and landline numbers. There are groups for card numbers, medical and vehicle IDs too.
- For anything else, such as a name, an address line or a specific transaction, use Custom Search (plain text, or a regular expression if you know them).
- Review the list of matches and untick any that should stay. Patterns are broad by design: the bank-account pattern matches any 9–18 digit number, which can include reference numbers you want to keep.
- Choose a redaction colour and run it.
On every page with a match, the tool renders the page as an image, burns the boxes into it, and replaces the page with that image. The original text on those pages no longer exists in the output. The cost is that those pages are now images: their text is no longer selectable or searchable, and the file may get larger. Pages without matches are left as they were.
Redacting scanned documents
A scanned PDF or a photo of a card is already an image. There is no text for a pattern search to find, so the redact tool will report no matches. For these:
- Draw a filled box over the area in Edit PDF.
- Then flatten the page to an image so the box and the scan merge into one picture. Running the file through Compress PDF in "Pages to images" mode, or through the PDF DPI Converter, both re-draw each page as a new image.
- Check the result as described below.
Without step 2, the box is an overlay and the original scan underneath can still be extracted.
Always check the result
Do this every time, whatever tool you used:
- Search for the redacted number in a PDF viewer (Ctrl+F). It should not be found.
- Select all and copy the page text, then paste into a text editor. The hidden values should be absent. Extract Text does the same in one step.
- Zoom in on the edges of each box. Make sure no partial digits peek out.
- Check other places the data appears. Bank statements repeat the account number in headers and footers. Statements often show your customer ID, which might be just as sensitive.
Remove the metadata too
PDF files carry hidden properties: author name, the software used, creation and modification dates, sometimes a title that includes a file name like "Rahul_Aadhaar_full.pdf". Use PDF Info to see what is there, and Remove Metadata to strip author, title and dates before sharing.
What to redact, practically
| Sharing | Usually safe to hide |
|---|---|
| ID copy for hotel or rental | All but last four Aadhaar digits; consider masking date of birth if not needed |
| Bank statement for a visa or rent proof | Middle digits of account number; unrelated personal transactions if the recipient allows |
| Salary slip for a rental | PAN, bank account, UAN, employee ID |
| Medical report to an employer | Diagnosis details not relevant to the request |
Do not alter figures or anything that changes the meaning of an official document. Removing information is different from changing it, and recipients such as embassies may require unaltered statements.
Share less in the first place
Redaction is the second line of defence. The first is not sending more than needed. Ask whether a copy of the ID is really required, or whether showing the original is enough. Write the purpose and date across a photocopy ("For hotel check-in only, 15-10-2026") so the copy is less useful for anything else; on a PDF you can add this as a watermark. Send only the pages needed: a single month's statement rather than a year.
Troubleshooting
- No matches found. The PDF is a scan with no text layer, or the number is split oddly (for example by line breaks). Use Custom Search with part of the number, or the scanned-document method.
- Too many matches. Untick the pattern groups you do not need, and deselect individual matches.
- File got larger. Redacted pages are now images. Compress afterwards if needed.
File Studio's redaction runs in your browser, so the unredacted document is not uploaded anywhere, which is the point of redacting it in the first place.