everyday mac tools

Find hidden white text in a PDF on a Mac, and remove it

· 7 min read

Hidden text in a PDF is ordinary text you cannot see: white on a white page, set too small to read, tucked under a picture, pushed past the edge of the page, or the invisible text layer of a scanned document. The fastest check on a Mac is to open the file in Preview, choose Tools, Text Selection, and press Command-A. Every piece of text lights up with a selection highlight, including the pieces with nothing visible underneath. Then copy it and paste it into TextEdit as plain text to read all of it.

Why a PDF has text you cannot see

Most hidden text is harmless, and some of it is deliberate. It helps to know which kind you are looking at.

  • Leftovers. A template’s placeholder turned white instead of deleted, or a note hidden by changing its color.
  • Covered text. A black or white rectangle drawn over text hides it from the eye but leaves it in the file. Why a black box on a PDF does not redact anything explains why.
  • Text outside the page. Cropping hides part of a page rather than removing it; see Crop a PDF on a Mac, and why the cropped part is still there.
  • Planted text. Words in white meant to be read by software rather than people: keywords stuffed into a job application, or instructions aimed at an AI assistant that someone will ask to summarize the file.
  • The scan’s text layer. A scanned PDF that has been made searchable carries an invisible layer of recognized text over the page image. That one is meant to be invisible, and it is what lets you search and copy from a scan.

Check 1: let the selection show you

The selection highlight is drawn wherever there is text, whatever color that text happens to be.

  1. Open the PDF in Preview.
  2. Choose Tools, Text Selection.
  3. Click on a page and press Command-A.
  4. Scroll through the document. Highlighted bands across empty white space, blocks of highlight over a photo, or a highlight running off the edge of the page all mark text you cannot see. If a page shows no highlight at all, click on it and press Command-A again.
  5. Zoom in on anything suspicious with Command-plus. Text set at a tiny size can look like a faint line or a speck until you zoom.

On a scanned page that has been made searchable, the whole page lights up, because the recognized text sits over the image. That is normal. What you are looking for there is highlighted text over areas with no printed words.

Check 2: paste it where it cannot hide

Reading the text out is more reliable than looking at highlights, especially in a long document.

  1. With the text selected in Preview, press Command-C.
  2. Open TextEdit and create a new document.
  3. Choose Format, Make Plain Text, so no color or size can come along with the paste.
  4. Press Command-V and read the result from top to bottom.

Anything in the TextEdit window that you cannot see on the PDF page is hidden text. Planted instructions tend to stand out quickly, because they are addressed to a reader that is not you. On a scan, the text layer may not match the image where recognition made mistakes; Make a scanned PDF searchable on a Mac covers how that layer is made.

Check 3: search for what you suspect

If you have an idea of what might be there, press Command-F in Preview and type it. Preview lists every match in the sidebar and jumps to each one; a match that lands on a blank patch of page is text you cannot see. Try the names or account numbers you thought you had removed, and words like “ignore” or “instructions” if you suspect text aimed at software. For a whole folder, see Search for a word across many PDFs at once on a Mac.

For a file that matters, an Automator extraction pulls out every text string on every page; the steps are in How to check whether a PDF was really redacted.

Removing hidden text from a PDF you are about to send

The best fix depends on whether you still have the document the PDF was made from.

  • You have the original. Delete the hidden text there, in the app that made the document, and export a new PDF. This is the cleanest result, because the text never reaches the PDF at all.
  • You only have the PDF. Use a real redaction tool on the areas that hold hidden text, so the text is removed rather than covered. Preview has one under Tools, Redact; Redacting a PDF in Preview explains what it removes and where it stops.
  • The text is everywhere and the PDF does not need to be searchable. Turning every page into an image and back into a PDF removes all text, hidden or not. The cost is that nobody can select, search or have a screen reader read the result, so treat this as a last resort.

Whichever you choose, run Check 1 and Check 2 again on the file you are about to send, not on your working copy. The two are often different files.

Basalt is a Mac PDF app built around redaction that destroys content rather than covering it. Text under a mark is cut out glyph by glyph and what survives is re-emitted in place, and you review every mark before it is applied. Before any file is written, its verifier re-opens the export with an independent parser and proves the marked strings are absent; if a check fails, no file is written. Its Inspect tool shows what a PDF still hides. Basalt runs on macOS 13 Ventura or later and is free for 24 hours with every tool, then $29 for a lifetime license on up to three Macs. For one stray line of white text, Preview is often enough.

If someone sent you the PDF

Hidden text does not make a PDF dangerous to open; it is text, not code. Is it safe to open a PDF attachment on a Mac covers the real risks. The concern is what reads the file next. An AI assistant, a summarizing tool or an automated screening system reads hidden text as readily as visible text, and may act on instructions you never saw. Run Check 2 first, or paste in only the visible text you need.

Questions

Does saving as PDF from the print dialog remove hidden text? No. Saving through the print dialog generally keeps text as text, including text you cannot see. Use one of the removal methods above instead.

Why does the whole page highlight on a scanned document? Because a searchable scan carries a full layer of invisible recognized text over the image. That is expected. Look instead for highlighted text where the page has no printed words.

Can this find words hidden inside an image? No. Words that are part of a picture are pixels, not text, so Select All and search skip them. Zooming in and reading the image yourself is the check for those.