Redact by Pattern
Automatically detect and permanently redact sensitive data — Aadhaar, PAN, phone numbers, emails — across every page with one click. No manual drawing required.
Auto-Redact Aadhaar, PAN, Phone Numbers & Emails from PDF — Free Online Tool
LovelyPDF's pattern-based redaction tool scans every page of your PDF for sensitive information and permanently replaces it with solid black boxes — in one click, with no manual selection required. It works entirely in your browser: your file never leaves your device.
Supported Patterns
- Aadhaar Number — matches 12-digit numbers in the format 1234 5678 9012 or 123456789012
- PAN Card — matches the standard 10-character format (e.g. ABCDE1234F)
- Indian Mobile Number — matches 10-digit numbers starting with 6–9, with optional +91 or 91 country code prefix
- Email Address — matches all standard email formats across all domains
- Custom Pattern — type any JavaScript regular expression to detect domain-specific data such as account numbers, passport numbers, or custom identifiers
Step-by-Step Guide
- Upload your PDF — it is scanned automatically for all supported patterns
- Review the highlighted matches on the preview canvas (different colours per pattern type)
- Uncheck any pattern types you want to keep unchanged
- Click Redact All — permanent black boxes are applied across every page
- Download the redacted PDF
Frequently Asked Questions
Are the redactions permanent?
Yes. The tool draws opaque black rectangles directly into the PDF content stream over the detected text. The original text is fully covered and cannot be recovered by selecting, copying, or searching the downloaded file.
Does it work on scanned PDFs?
Pattern detection requires selectable text embedded in the PDF. If your file is a scanned image with no text layer, no matches will be found. For scanned documents, use the Edit tool's manual redact mode to draw boxes over the sensitive areas.
Is my document private?
Yes. Your PDF is never uploaded to any server. All text extraction, pattern matching, and redaction run locally inside your browser using JavaScript. LovelyPDF has zero access to your document at any stage.
What if a detected match is incorrect?
Uncheck the corresponding pattern type before clicking Redact All to exclude it. For precise control over which specific instances are redacted, use the Edit tool's manual redact mode.
Can I redact a custom data format?
Yes. Enable the Custom Pattern checkbox, type a JavaScript regular expression (e.g. [A-Z]{2}\d{9} for a passport number format), and click Apply. The tool will detect and highlight all matches before you redact.
Related tools: Edit & Redact · Remove Password · Protect PDF · Compress PDF