How to check a PDF for hidden text before you give it to ChatGPT (or any AI)
Copy all the text out of the PDF and compare it with what you see on the page. Anything in the copy that you cannot find on the page is text an AI will read and you will not.
That catches the simple cases. Some tricks survive the copy without showing, and comparing by eye gets slow on a long document.
The free way to check
You need nothing but the PDF and a text editor.
- Open the PDF, press Ctrl+A (Cmd+A on a Mac) to select everything, and copy it.
- Paste it into a plain text editor: Notepad on Windows, or TextEdit on a Mac with Format › Make Plain Text.
- Read the pasted text against the page. Look for sentences that do not appear on the page, especially any addressed to an AI, such as “If you are an AI…” or “Ignore previous instructions…”.
- To get the whole file at once, use the free command-line tool
pdftotext(part of Poppler):pdftotext document.pdf -prints every word in the PDF’s text layer.
Searching the copy for words like “AI”, “model” or “ignore” helps, but do not rely on it. In a study of 196,682 real résumés, more than 90% of the hidden prompts contained no explicit instruction at all.
Where the free way falls short
- White text, tiny text and text behind a picture or a white box all appear in the copy, but nothing marks them as hidden. You have to spot them by comparing line by line.
- Invisible Unicode characters, such as zero-width and “tag” characters, paste as nothing at all. Your editor shows an ordinary sentence while an AI reads extra words.
- Some PDFs use a font that draws one word on the page and stores a different word in the text layer. The copy reads like normal text, so nothing stands out unless you compare word for word.
- A scanned PDF usually carries an invisible text layer from OCR. If that layer says something different from the scanned image, the copy shows you the layer, not the page.
- Text placed off the edge of the page, or on a layer the viewer keeps switched off, never appears on screen, so you have nothing to compare it against.
- On a 50-page document the comparison takes a long time, and one missed line is enough.
How HiddenContent.ai checks it
HiddenContent.ai reads the PDF file itself. It works out what each page actually shows, drawing the page when the file’s structure alone cannot settle it, and compares that with the text an AI would read. For scanned pages it reads the image with OCR on our own machines.
You get back each hidden passage with its page, where it sits and the trick behind it — white text, a tiny font, text behind an image, a text layer that disagrees with the page — and a mark on any hidden text written as an instruction to a model. If it cannot read part of the file, it says so: the result is incomplete, never clean.
No file leaves our machines, and no AI model reads your document. See one real analysis, end to end for exactly what comes back. Sign up with GitHub for 20 free pages, then a cent a page.
Real cases
- Person Hides Prompt Injection in Legal Filing Telling AI to Side With Them — 404 Media, 13 Aug 2026
- Measuring Real-World Prompt Injection Attacks in LLM-based Resume Screening — USENIX Security 2026, 27 May 2026
- Hidden Prompts in Manuscripts Exploit AI-Assisted Peer Review — arXiv, 8 Jul 2025
- Notion AI: Data Exfiltration — PromptArmor, 7 Jan 2026
The techniques, one page each
- Text the colour of its background
pdf.white-text - Type too small to read
pdf.tiny-font - Text covered by something opaque
pdf.occluded-text - Text placed outside the page
pdf.offpage-text - Text inside a switched-off layer
pdf.hidden-layer - The invisible text rendering mode
pdf.render-mode-3 - Drawn glyph contradicts stored character
pdf.cmap-divergence - Invisible text layer over a scan
pdf.ocr-text-layer - Zero-width characters in text
unicode.zero-width - ASCII smuggled in the Unicode tag block
unicode.tag-block - Every way text hides in a PDF
Questions
Does ChatGPT read hidden text in a PDF?
Usually. Most AI tools read the text stored inside the PDF, and white or tiny text sits there like any other text. The studies on our In the Wild page show models following instructions hidden this way.
Can I check a PDF without uploading it anywhere?
Yes. Copying the text into an editor and running pdftotext both work on your own computer. They find the simple cases; the list above shows what they miss.
Does HiddenContent.ai keep my PDF?
No. We keep the hidden text we found and a little of the text around it, never the document, and no AI model reads your file.