← Tools / Redact by Pattern
ℹ️ 100% private — your PDF is never uploaded to any server. All text extraction, pattern detection, and redaction happen locally in your browser.
Step 1 — Upload PDF
📄
Drop PDF here or click to browse

Single PDF · Processed entirely in your browser

How to use
  1. Upload your PDF — it is scanned automatically for all supported patterns
  2. Review the highlighted matches on the preview canvas (different colours per pattern type)
  3. Uncheck any pattern types you want to keep unchanged
  4. Click Redact All — permanent black boxes are applied across every page
  5. Download the redacted PDF

Supported patterns: Aadhaar (12-digit), PAN (ABCDE1234F), Indian mobile numbers (6–9 prefix, with optional +91), email addresses, and custom regex patterns.

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 cannot be recovered by selecting, copying, or searching the downloaded file.

Does it work on scanned PDFs?

Pattern detection requires selectable text. If your file is a scanned image with no text layer, no matches will be found. Use the Edit tool's manual redact mode for scanned documents.

Is my document private?

Yes. Your PDF is never uploaded to any server. All text extraction, pattern matching, and redaction run locally in your browser using JavaScript.

What if a detected match is incorrect?

Uncheck the corresponding pattern type before clicking Redact All to exclude it. For precise control, 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.

Sharing your Aadhaar? Read the full guide: How to mask Aadhaar number in PDF — UIDAI guidelines →

How to Redact Sensitive Information from a PDF

  1. Upload your PDF — the tool automatically scans every page for Aadhaar numbers, PAN numbers, phone numbers, and email addresses using pattern recognition.
  2. Review the coloured highlights on the preview canvas. Each pattern type uses a distinct colour so you can quickly identify what was found and where.
  3. Uncheck any pattern types you want to keep visible. For example, uncheck Phone if you want phone numbers to remain but Aadhaar and PAN to be blacked out.
  4. Click Redact All — permanent black boxes are applied over every matched instance across all pages — then download the redacted PDF.

Why use LovelyPDF

Pattern scanning and redaction happen entirely in your browser — your document never leaves your device. This is critical for documents containing Aadhaar numbers, PAN cards, and bank account details where sharing the original file with a third-party server would itself be a privacy risk. The entire redaction process is performed locally by pdf-lib and JavaScript.

No account is required and there is no page limit. Redact a single-page KYC document or a multi-page bank statement with the same tool and the same privacy guarantee. There is no watermark on the output and no subscription to manage.

The tool works on any device in any modern browser. Mask Aadhaar numbers on your phone before forwarding a document on WhatsApp, or batch-process a set of employee records on a laptop before archiving. The automatic pattern detection works identically on all platforms without any app installation.

Frequently Asked Questions

Are the redactions truly permanent? +

Yes — the black filled rectangles are burned into the PDF page during export at the vector level. The original text underneath cannot be extracted, searched, selected, or revealed by any standard PDF reader, text extraction tool, or copy-paste operation. This is true redaction, not a visual overlay that can be moved or deleted.

Can I add custom patterns beyond Aadhaar, PAN, phone, and email? +

The automatic detection covers Aadhaar, PAN, Indian phone numbers, and email addresses. For other patterns — such as passport numbers, bank account numbers, or custom internal identifiers — use the Edit PDF tool to manually draw redaction boxes over the specific areas on each page.

Does the tool work on scanned PDFs where numbers appear in images? +

Automatic pattern detection requires a text layer — it works on digital PDFs where the text is selectable. For scanned documents where numbers appear as part of a photographed image, use the OCR PDF tool first to add a text layer, then re-upload here for pattern-based redaction. Alternatively, use the Edit PDF tool to manually draw redaction boxes over the visible numbers in a scanned document.

Is this compliant with UIDAI guidelines for masking Aadhaar? +

The tool permanently blacks out all 12 digits of detected Aadhaar numbers. For sharing KYC documents under UIDAI's masking guidelines — which require the first eight digits to be hidden while retaining the last four — the black box covers the full number, which satisfies the requirement of not exposing the full Aadhaar. The redacted document is appropriate for sharing as a masked Aadhaar copy for KYC submission.