How to mask Aadhaar and PAN numbers before you share a document
If you need a masked copy of your own Aadhaar, use UIDAI's official masked e-Aadhaar, which shows only the last 4 digits of the number. This page is for people in India sharing documents: it explains that option first, then how to mask Aadhaar and PAN numbers that appear inside other PDFs such as bank statements, letters and KYC forms.
The short answer
There are two different jobs hiding under "mask Aadhaar", and they need different tools.
The first is your own Aadhaar card. You want a version you can hand to a hotel or a landlord without giving away the full number. UIDAI makes that for you, and it's the one to use. Don't edit the card yourself in any tool, mine included.
The second is an Aadhaar or PAN number sitting inside some other document: a bank statement header, a loan sanction letter, a filled KYC form, an HR spreadsheet. UIDAI can't help there, and that's the narrow part where Fileshape is useful.
For your own Aadhaar: UIDAI's masked e-Aadhaar
UIDAI describes masked Aadhaar as replacing the first 8 digits of your Aadhaar number with "xxxx-xxxx", so that only the last 4 digits are visible. It's an option on the e-Aadhaar, the PDF version of your Aadhaar that you download yourself.
According to UIDAI, you download e-Aadhaar from the myAadhaar portal or the mAadhaar app, you confirm with an OTP sent to your registered mobile number, and the masking option applies to the copy you download. The PDF is password-protected, and UIDAI says the password is the first 4 letters of your name in capitals followed by your year of birth, so SURE1990 for a Suresh born in 1990.
That masked e-Aadhaar comes from UIDAI itself, which is why I'd always choose it over a copy you've blacked out yourself. Whether a particular bank or office accepts the masked version is up to them, so ask if you're not sure.
Why I wouldn't mask an Aadhaar card by hand
A photo or a scan of an Aadhaar card is a picture, and a self-edited ID is something the person receiving it has every reason to reject. Fileshape's mask editor doesn't take images or scanned PDFs at all, so it can't do this, and I'd rather say that plainly than have you find out halfway.
The editor does open password-protected PDFs when you give it the password, but I haven't tested it on a real e-Aadhaar, and masks there attach to text only, so the photo and the QR code on the page would stay as they are. UIDAI's own masked download is the right answer for the card itself.
Aadhaar and PAN numbers inside other documents
Here's the situation I do have a tool for. Your bank statement PDF prints your PAN in the header. A salary letter lists both numbers. A KYC form you filled in as a PDF has them in labelled boxes. You want to send that document to an accountant, or paste it into ChatGPT or Claude to ask a question, and those two numbers have no business going along.
The mask editor finds them in text-based PDFs, Word files and text files. It's free and needs no account.
How to mask them, step by step
It takes a couple of minutes:
- 1. Open fileshape.app/mask and add the PDF, .docx or .txt file. Enter the password if the PDF has one.
- 2. Look under ID numbers in the side panel. PAN numbers and Aadhaar numbers that were found are already masked.
- 3. Search the page for any that were missed (see the next section) and select them with your mouse to mask them. Mask all catches every repeat.
- 4. Choose the style. "X out, keep last 4" turns 1234 5678 9012 into XXXX XXXX 9012, the same idea as UIDAI's masked format. Black out hides everything.
- 5. Download the masked PDF. Its pages are rebuilt as pictures, so the numbers aren't under the boxes any more.
What it recognises, exactly
I'd like you to know the rules so you know where to look by hand.
A PAN is recognised by its shape anywhere in the text: five capital letters, four digits, one capital letter, like ABCDE1234F.
An Aadhaar number is recognised when it's written the usual way, as three groups of four digits with spaces between them. It's also picked up after a label such as "Aadhaar No:" or "UID No:", whatever the spacing. That's the catch: a bare 12-digit run with no spaces and no label looks like any other reference number, so it isn't flagged, and you'd select it yourself.
And none of this works on scans. If the document is a photo of a form, there's no text to find.
In spreadsheets
Employee lists, customer exports and loan files often have PAN and Aadhaar as columns. When you add a CSV or Excel file on your files page or to Hide, Mask and Shrink, columns with those headers, or whose values look like PAN or spaced Aadhaar numbers, start out as masked, which keeps the last 4 characters. You can switch them to Hide to drop them completely, and for an AI question that's usually what I'd do, since few questions need an ID number even as a label.
More on choosing between the two in data masking tools and hide personal data before sharing with AI. If the document is a bank statement, is it safe to upload a bank statement to ChatGPT covers the rest of what's in one.
Ask AI about this file
Ask ChatGPT, Claude or Cursor about your file. Fileshape cleans it, masks personal columns and gives your AI one link, so totals come from every row.
FAQ
Questions
What is a masked Aadhaar?
UIDAI describes it as an e-Aadhaar in which the first 8 digits of the Aadhaar number are replaced with xxxx-xxxx and only the last 4 digits are visible.
How do I get a masked Aadhaar?
Download your e-Aadhaar from UIDAI's myAadhaar portal or the mAadhaar app and choose the masked option. You confirm with an OTP sent to your registered mobile number.
Can Fileshape mask my Aadhaar card?
Not a photo or scan of the card. The mask editor works on text in PDFs, Word and text files and doesn't take images. For the card itself, use UIDAI's official masked e-Aadhaar.
How do I mask a PAN number in a PDF?
Open the PDF in the mask editor at fileshape.app/mask. PAN numbers are found by their pattern and masked. Check the result, then download the masked PDF.
Is there an official masked PAN card?
I couldn't find one on an official page, so I'm not going to claim it exists. For a PAN printed inside another document, mask the number in that document.
Does it work on a scanned KYC form?
No. A scan is a picture of the page, and pictures can't be masked in the editor yet. It works when the PDF contains real, selectable text.
More from the blog
Keep reading
- Claude MCP: how to add connectors in claude.ai, Claude Desktop and Claude CodeThe three ways to add an MCP server to Claude: custom connectors in claude.ai, the Claude Desktop config file and claude mcp add in Claude Code.
- ChatGPT MCP: how to add an MCP server (what used to be a custom connector)Which ChatGPT plans can add a custom MCP server, the steps on the Plugins page, sign-in options and limits, with a spreadsheet server as the example.
- Filesystem MCP server: what it is, how to set it up, and where it stopsWhat the official Filesystem MCP server does, the Claude Desktop config for it, its tools and limits, and what to use in claude.ai or ChatGPT instead.
- The best MCP servers for files, by what you need them to doAn honest list of MCP servers for files, picked by job: local folders, CSV and Excel, Google Sheets, PDFs, databases and cloud drives.
Updated 2026-12-06