How to Redact a PDF So the Text Is Really Gone
By Docmint Team · · 5 min read
Covering text with a black box hides it but leaves it in the file. Here is how to remove names and numbers from a PDF for good, and how to check it worked.
To redact a PDF properly, the words have to be removed from the file, not just covered up. In Docmint's Redact PDF, type the words or phrases to remove, one per line, tick email addresses, phone numbers or card numbers if you need them, check the boxes it draws on the pages, drag to add any boxes of your own, and click Redact PDF. Every page with a box is rebuilt as an image with those areas painted solid black, so the text underneath no longer exists. Then open the result and search for a redacted word: nothing should come back.
Why a black rectangle is not a redaction
Most PDF editors let you draw a filled shape or highlight text in black. On screen that looks like a redaction, but the shape is only a new object placed on top of the page. The text is still in the file, in the same position. Anyone who receives the document can drag across the black area and copy what is under it, find it with Ctrl+F (Cmd+F on a Mac), pull it out with a text extraction tool, or simply delete the rectangle in an editor.
The same problem applies to black highlighting in a word processor before exporting to PDF, and to pasting a black image over a scan that has been through OCR. A searchable scan carries an invisible text layer over the picture, and a box drawn on the picture leaves that layer untouched. Hidden-but-present text is a common way for confidential details to leak from documents that look redacted.
Real redaction means the content under the box is gone from the file. A dedicated redaction feature does this by deleting or replacing what lies underneath, not by adding something on top.
What happens to your file in Redact PDF
When you click Redact PDF, each page that has at least one box is drawn as an image at the resolution you choose (150, 200 or 300 DPI, with 200 as the default), and the boxes are painted black into that image. The new page contains only pixels. The text, fonts, vector shapes and pictures that were under the boxes do not exist in the output, and there is no hidden layer to recover them from.
Pages without any boxes are copied across unchanged, so their text stays selectable and searchable. The output is a new document: the original's title, author and other document properties, its bookmarks, file attachments and form data are not carried over. That also means a name hiding in the author field or an attached spreadsheet does not travel with the redacted copy.
The file is processed in your browser and never leaves your device, which matters for exactly the kind of document people redact.
How to redact a PDF with Docmint
- Open Redact PDF and drop in the document. Every page is shown so you can see what will be removed.
- Type the words or phrases to remove, one per line: names, company names, account references. Matching ignores capitals.
- Tick the patterns you need: email addresses, phone numbers or card numbers. Matches are boxed on the page previews.
- Review the boxes. Click a match to keep it, for example your own company's phone number on a letterhead.
- Drag on a page to draw extra boxes over anything else: a signature, a photo, a table, a stamp. Click × on a box to remove it.
- Choose the resolution of the redacted pages, click Redact PDF and download the new file.
Finding names, emails, phone and card numbers
Word search finds each term wherever it appears in the text layer, across every page. Names are where most misses happen, because people write them in several ways. Add each variant on its own line: full name, surname alone, initials, a nickname, and the email address, which often contains the name in yet another form.
The patterns cover the usual personal details. Email addresses are matched by their shape. Phone numbers are runs of 8 to 15 digits in common formats, with spaces, dots, dashes, brackets or a leading +; dates written like 2026-11-18 are not treated as phone numbers. Card numbers are 13 to 19 digits that also pass the Luhn checksum used by payment cards, which filters out most other long numbers such as order references.
Patterns will not find everything. Postal addresses, bank account numbers, national ID numbers and case references come in too many formats to guess, so add them as search terms or draw boxes over them.
Scanned pages need boxes or OCR first
Search reads the PDF's text layer, and a scanned page does not have one: it is a picture of the page. Nothing will be matched on it. You have two options. Draw the boxes by hand, which is reliable for a few pages. Or run the scan through OCR PDF first, so the words become searchable, and then search the result in Redact PDF. OCR can misread a character, so look over each page before redacting rather than assuming every occurrence was found.
How to check that a redaction worked
Do this every time before you send the file, ideally in a different PDF viewer from the one you normally use.
- Search for each redacted word and number. There should be no results on the redacted pages.
- Try to select text inside a black box. On a redacted page, nothing should highlight, because the page is an image.
- Select all and copy the document into a plain text editor. Read what comes out for the pages without boxes, which were copied unchanged.
- Look through every page at normal zoom for anything the search could not see: names in images, handwriting, stamps.
- Check the document properties. The redacted copy should not carry the original's title or author.
Trade-offs to plan for
Because redacted pages are images, their remaining text can no longer be selected or searched, and the file usually gets larger. 150 DPI keeps it smaller, 300 DPI suits printing. If the result is too big to send, run it through Compress PDF. If you need searchable text again, OCR PDF can add it back; it only finds what is still visible, so the redacted words stay gone.
Redaction cannot be undone in the output file, which is the point. Keep the unredacted original somewhere safe and send only the redacted copy. If you need to remove different details for different recipients, redact a fresh copy of the original each time.