← DocRedact.in

Redact PAN card online

Your browser blacks out your PAN number and photo and hands back a clean image-only PDF. Nothing uploaded. Nothing stored. Free forever.

Why mask your PAN before sharing it

Sharing a PAN copy also shares the personal details visible on it. If the recipient does not need the full number or photograph, masking those fields reduces what you disclose. Ask which fields are required and whether a redacted copy is acceptable before sharing.

This tool masks the entire detected 10-character PAN number. Detected photographs are also selected by default. Other details, such as names and dates, remain visible unless you cover them in manual mode.

How the PAN detection works

When you drop a card image or take a photo, your browser runs Tesseract — an open-source OCR engine compiled to WebAssembly — to read the text on the card. The tool then looks for the exact PAN shape: five letters, four digits, and a final letter (for example ABCDE1234F). A bare pattern match is not enough on its own, because OCR noise and other printed codes can resemble that shape, so the fourth character is checked against the valid PAN holder-type codes — P for an individual, C for a company, H for a Hindu Undivided Family, F for a firm, and so on. A candidate whose fourth character is not a real holder-type code is rejected rather than masked.

One honest limitation worth stating plainly: PAN does not carry a public checksum the way an Aadhaar number carries its Verhoeff check digit. For Aadhaar we use a checksum to reject invalid digit strings; a valid checksum does not prove that a region is an Aadhaar number. For PAN the defences are the strict character structure and the holder-type gate, which are strong but not a checksum. That is one of the reasons every detection on this site appears as a checkbox in a review list before anything is written — you confirm the box is over your real PAN, and you can switch off anything that was picked up by mistake.

The signature strip is not detected as its own field. If you want to hide your signature as well, use the manual draw-to-redact mode to drag a rectangle over it before you download — manual rectangles flow through the exact same flattening step as the automatic detections.

PDF input is handled by rasterizing each page to a canvas at three times its base resolution with pdf.js, then running the same detection pass on that canvas. The masked regions are drawn as solid black rectangles, the page image and the mask are flattened together, and a new image-only PDF is written in your browser with pdf-lib. Because the output has no text layer, the masked PAN cannot be recovered with copy-paste or pdftotext.

Why the privacy story is real and verifiable

DocRedact.in does not send your file to a server for redaction. The tool is a static bundle of JavaScript, HTML, and WebAssembly that your browser downloads when you open the page; every step after that runs on your own CPU, in your own tab. You can check this three ways:

Frequently asked questions

Is my PAN card uploaded?
No. OCR, detection and export run in your browser. Network requests load software and optional page analytics, not your document. Inspect DevTools → Network or read the source on GitHub.
What part of the PAN card is masked?
The detected full 10-character PAN number and face photograph are selected by default. Detected Aadhaar numbers, passport MRZ regions and probable UIDAI QR codes are also selected. Review each selection and check which fields the recipient needs.
How does PAN detection work?
Local OCR looks for five letters, four digits and a final letter, then checks the fourth character against PAN holder-type codes. These checks reduce false positives but do not prove a number is a real PAN. Detection can miss content or select a wrong region; review the output.
Does it cover my signature?
Signatures are not detected automatically. Use manual mode to draw a rectangle over your signature or any other content you want hidden.
What files and sizes work?
JPG, PNG, WebP and PDF up to 20 MB and 10 PDF pages, subject to the 40-million-pixel per-page and 80-million-pixel document budgets after rasterization. Resize large images or split large PDFs if needed.
What does the output contain?
A new image-only PDF with selected regions painted solid black, no original text layer and no removable mask shapes. The source file is unchanged. Unmasked personal details remain visible; verify every page before sharing.
Why is this free?
The consumer tool is free and open source. A browser-side business integration is planned, not currently available. Join the API waitlist for updates.

Related

Masking an Aadhaar instead? Mask Aadhaar online. Working with a downloaded PDF? Hide an Aadhaar number in a PDF. Want the architecture? How it works, or read our privacy policy.