Document X-Ray
The problem What it catches Batch For platforms Pricing Account
Scan a document
How-to

How to find hidden text in a document.

Text in a file does not have to be visible to be read. Here are the manual checks that find most of it, what each one misses, and how to do the whole thing at once.

Check a file free See a prepared example →

The quickest check: select all, and paste

Open the PDF, press Ctrl+A then Ctrl+C, and paste into a plain-text editor — Notepad, TextEdit, anything that will not carry the formatting across. Read what arrives. If there is a sentence in the paste that you cannot point to on the page, that sentence is hidden.

This takes ten seconds and catches the two most common tricks: white text on a white background, and type set small enough to read as a smudge. It is worth doing before anything else.

Where it falls down. Some viewers do not include text drawn in an invisible render mode in a selection, and none of them include text positioned outside the page edge — both of which a parser reads normally. It also cannot show you document properties, which never appear on the page at all. And on a long document, the comparison is the hard part: you are asked to notice the absence of a line among several thousand.

Where text hides, one at a time

White on white

The oldest method and still the most common. Select the whole page and look for a highlight rectangle sitting over apparently blank paper. In Word, select all and set the font colour to something loud; anything that was invisible appears.

Type too small to read

One-point text looks like a printing artefact, or like nothing. Zoom to 800% and scan the margins, the header and the area below the last line. A selection highlight gives it away faster than your eyes will.

Invisible render mode

PDF has an instruction that means draw this text with no ink. It exists for a good reason — it is how a scanned page carries a searchable transcript underneath the image — and for that reason it cannot be treated as suspicious on its own. There is no way to see it in a viewer, because there is nothing to see. Extraction returns it in full.

Covered by an image or a box

Text painted over by something drawn later is still in the file, in order, and comes out of a parser as though it were on the page. A viewer will never show it. If a selection highlight appears on top of a logo or a photo, something is underneath.

Outside the page edge

A page has a crop box, and content placed beyond it is simply not drawn. Several widely used extraction libraries return it anyway, because they read the content stream rather than the rendered page.

Document properties

Title, author, subject and keywords are part of the file, never part of the page, and most ingestion pipelines read them. In Acrobat this is File → Properties; in Windows Explorer it is the Details tab. Worth a look, and quick.

Word and Excel make it easier

Word has a dedicated Hidden font attribute: turn on formatting marks (Ctrl+Shift+8) and hidden text appears with a dotted underline. Excel has hidden sheets, rows and columns, all of which parse as ordinary cells — right-click any sheet tab and choose Unhide to see what is there.

The rule underneath all of it

Every check above is a version of one question: does this text draw anything on the page? Not whether it looks suspicious, not whether it contains a phrase you have heard of — whether a reader could have seen it. Text that reaches the parser and not the reader is hidden, whatever it says and however it was done.

That framing matters because the wording of a payload is unlimited and the ways of concealing one are not. Searching for "ignore all previous instructions" catches the clumsy attempts and nothing else. Asking whether a run of text drew a single pixel catches the technique regardless of the sentence.

Doing all of it at once

Document X-Ray renders every page twice — once as published, once with every glyph removed — and compares the two, pixel by pixel, for each run of text. Anything that changed nothing is reported, along with what it said and how it was concealed. It reads the document properties, checks off-page content, and compares what several different extractors receive, because a difference between them is itself a signal.

One file costs nothing and needs no account, and your upload is deleted the moment the scan finishes.

Scan a document Check a whole folder

Common questions

Is hidden text always malicious?

No, and this is the main reason naive detection is annoying rather than useful. A scanned page carries an invisible transcript so that it can be searched. Accessibility tooling adds text that is meant for a screen reader and not for the eye. Templates leave white placeholder text behind. A useful scanner reports what it found and how much of it there is, and leaves the judgement to you.

Can I just strip it out?

You can, and it is often the right move for a file you intend to feed to a model. Document X-Ray returns a cleaned copy with the concealed runs removed and the visible page untouched. Keep the original: the hidden text is evidence.

Does this apply to files other than PDFs?

Yes. DOCX and XLSX have their own mechanisms — the hidden font attribute, white fill, hidden sheets and columns — and are scanned the same way. Images are a different problem: text baked into a picture is visible to a person and invisible to a parser, which is the reverse of what this looks for.

Why not just look at the file in a text editor?

A PDF's content streams are usually compressed, so opening one in an editor shows binary rather than words. Office files are ZIP archives, so you can unpack them and read the XML — which does work, and is a reasonable way to check a single suspicious file if you are comfortable doing it.

Related: hidden text in résumés for the hiring case, and prompt injection through documents if you are the one building the pipeline.

Document X-Ray — a service of Clarion Product Labs LLCFinding hidden text Prompt injection Résumé screening Privacy Terms Your file is deleted the moment the scan finishes