DoraPDF / Blog

How to Black Out Text in a PDF Properly: Real Redaction vs. Drawing Black Boxes

By the DoraPDF team · 5 min read · Updated 2026-11-24
How to Black Out Text in a PDF Properly: Real Redaction vs. Drawing Black Boxes

You need to send a contract, a medical bill or an ID copy, but one line has to disappear first: a phone number, an account number, a home address. The quick fix most people reach for is a black rectangle or a thick black highlighter in a PDF reader. It looks perfect on screen. The problem is that, in many cases, the text underneath is still there. This guide explains how to black out text in a PDF so the information is actually removed, and how to check your result before you hit send.

Why a black box is not redaction

A PDF page is built in layers. The text you read is stored as real characters, with fonts and positions. When you draw a rectangle or use a black highlight in a viewer, you add a new shape on top. The characters below are untouched.

That leads to a few well-known failure modes:

Printing the page and scanning it again does remove the text layer, but it costs paper and time and lowers the quality. There is a cleaner way.

What proper redaction does differently

Real redaction removes the information from the file, not just from view. The Redact PDF tool on DoraPDF does it like this:

  1. It reads the text on each page and finds every place your words appear.
  2. It paints a solid black box over each match.
  3. It then flattens every page into an image and builds a new PDF from those images.

After step 3 there is no text layer left in the redacted file at all, so there is nothing under the black box to copy, search or extract. The tool's own note says it plainly: redacted pages are flattened to images so hidden text cannot be recovered.

How to redact a PDF step by step

  1. Open Redact PDF.
  2. Drop in your PDF.
  3. In Words to redact, type what should disappear, separated by commas. For example: Ayesha Khan, 0300-1234567, 42101.
  4. Press Redact. The result tells you how many redactions it made, for example 12 redactions.
  5. Download the file ending in -redacted.pdf and open it to check every page.

Matching ignores upper and lower case, and it finds every occurrence across all pages, so a name that appears in the header of each page gets covered everywhere.

Getting the words right

Most redaction mistakes are not technical. They are about forgetting a variant. Before you press the button, think about how the information can appear:

A good habit is to first run the document through PDF to TXT. Skim the text output for anything sensitive you missed, and copy the exact spelling into the redact box.

When nothing gets redacted

If you see None of those words were found, the most likely reason is that your PDF is a scan or a photo. It has no text layer, only a picture of text, so there is nothing to match. Run it through PDF OCR first. OCR recognises the text and creates a searchable copy. Then redact that copy and inspect the black boxes carefully, because OCR positions on poor scans can be slightly off.

Where the PDF Editor fits in

The PDF Editor is useful after redaction, not instead of it. It lets you click anywhere on a page and add text, with your choice of size and color. Typical uses:

Do not use the editor to hide information by typing over it. Like a drawn box, added text sits on top of the original content, and on a file that still has text underneath it would not remove anything. Always redact first, then annotate.

Check your redaction before sending

Spend one minute on these tests with the downloaded file:

  1. Try to select text on a redacted page. You should not be able to, because the page is an image.
  2. Search for the name or number with Ctrl+F. Nothing should be found.
  3. Zoom in on each black box and make sure it fully covers the characters, including the tops of tall letters.
  4. Scroll through every page. Headers, footers and the last page are where leftovers hide.

Because pages become images, the redacted file is also not searchable for the rest of the content. That is the price of safety. Keep your original, unredacted file for your own records and send only the redacted copy.

Privacy

Redact PDF runs in your browser. The document and the words you type are processed on your own device and are not uploaded to our server. That matters here more than anywhere: the whole point of redaction is that the sensitive text should not travel.

FAQ

Is a black highlight in my PDF reader safe? Usually not. Highlights and shapes are added on top of the text, which stays in the file and can be copied or extracted.

Can someone undo DoraPDF's redaction? The redacted pages are flattened to images, so the removed text is not stored in the output file. Keep in mind that anything you did not list as a word to redact remains visible as part of the image.

Can I redact by drawing a box with my mouse? Redact PDF works by words, not by drawing. Type the exact text you want removed, including different spellings and number formats.

Will my file get bigger? Often yes, because pages are stored as images. If you need a smaller file for email, compress it afterwards.

Try the tools from this guide — free

Keep reading

Guide

How to Highlight and Annotate PDFs for Studying (A Color-Coded Method)

Turn a lecture PDF into a study guide: color-code key terms with auto highlighting, add margin notes, and pull out text for revision. Free, in your browser.

Guide

Offline PDF Editor for PC: DoraPDF Desktop for Windows and Linux

Need PDF tools without internet? DoraPDF Desktop runs 160+ tools offline on Windows and Linux: merge, compress, convert, edit, OCR and more.

Guide

Can't Copy Text From a PDF? 4 Causes and the Fix for Each

PDF won't let you select or copy text? Find out if it's a scan, a restricted file or an image, and get the text out for free in your browser.