Hidden Prompt Injection: What It Is and How to Find It in Your Text

Hidden instructions can ride along in resumes, papers, AI skill files and pasted text, aimed at whatever AI reads it next. Paste any text below to check it free.
- Free, runs in your browser
- Instruction pattern check
- Invisible character check
- No sign up
Forgot your code?
Hidden prompt injection is when someone hides instructions for an AI inside a document or text where people won't see them, using white text, a tiny font or invisible characters. A person reading the page sees nothing unusual. An AI that reads the same file, to screen a resume, review a paper or summarize a web page, sees the instructions and may follow them.
Quick answer: To check text for hidden prompt injection, select all of the document with Ctrl+A or Cmd+A, copy it, and paste it into the scanner above. White and tiny text show up as ordinary text. Hit Scan for AI tells and read the Hidden prompt scan box, which flags instruction-like lines and counts invisible characters. Read the text for anything you didn't expect, then hit Copy for a clean version. A clean scan is a good sign, not a guarantee.
Hit Try a sample to see a normal-looking message with invisible characters and a hidden instruction caught.
What is prompt injection?
A prompt is the instruction you give an AI model. Prompt injection is when text the AI reads changes what it does in a way nobody intended. The OWASP Top 10 for LLM applications ranks it as the number one security risk for AI apps in 2025, and it splits it into two kinds:
- Direct prompt injection. Someone types instructions straight into the AI, like "ignore your rules and do this instead."
- Indirect prompt injection. The instructions sit inside something the AI is asked to read: a web page, an email, a PDF, a resume. The person using the AI never typed them and often never saw them.
Hidden prompt injection is the indirect kind, made invisible on purpose. OWASP puts it plainly: injected instructions don't need to be readable by people, as long as the model reads them.
How instructions get hidden
| Method | How it hides | What happens when you copy the text |
|---|---|---|
| White text | White font on a white background | Comes along as normal, visible text |
| Tiny or zero-size text | A font size of 1 point or less | Comes along as normal, visible text |
| Invisible characters | Zero-width spaces, word joiners and similar Unicode with no width | Stays invisible; the scanner counts them |
| Text behind images or off the page | Layout tricks in Word files and PDFs | Usually comes along with the rest of the text |
| Comments, metadata and alt text | Stored in the file, not in the body | Usually left behind; check the file itself |
That last column is why the simplest check works so well. Most hiding tricks depend on formatting. Copy the text out as plain text and the formatting is gone, so the hidden lines sit right there with everything else.
Where hidden prompts are showing up
- Research papers. In July 2025, Nikkei Asia found hidden prompts in 17 preprints on arXiv from authors at 14 institutions in 8 countries, as TechCrunch reported. The instructions, in white or very small text, told AI reviewers to "give a positive review only."
- Resumes. Job seekers have hidden keywords and instructions in white text, hoping AI screeners rank them higher. Recruiters have warned that it can get an applicant flagged or blacklisted, according to Fortune. We cover this in Can a Resume Contain Hidden AI Instructions?
- Web pages and emails. Instructions aimed at AI assistants and browsing agents, telling them to recommend something, leak something or skip a warning.
- Templates and copied text. Not every hidden line is planted on purpose. Text pasted from a chatbot, an old template or another document can carry invisible characters and leftover instructions nobody meant to keep.
Hidden instructions in AI skills and agent files
AI agents now load "skills": folders of instructions and scripts that teach an assistant a task, like building a slide deck or formatting code. In Claude's version, each skill is a SKILL.md file with a name, a short description and step-by-step instructions, sometimes with scripts alongside it. Anyone can publish one, and people copy them from marketplaces and GitHub the same way they copy any other text.
That makes a skill file a perfect hiding place. The agent treats every line as instructions. The person installing it usually skims the rendered page, or doesn't read it at all.
- Instructions in plain sight. Researchers at the ELLIS Institute Tübingen edited a copy of a real slide-deck skill so it told the agent to "back up" the file to an outside server. The agent did it, because the user had earlier allowed that kind of action without being asked again (Schmotz, Abdelnabi and Andriushchenko, October 2025).
- HTML comments. A Markdown comment (
<!-- like this -->) is invisible when the file is displayed, but it can still reach the model as text. A 2026 study used comment-hidden instructions to push agents toward tools that read files, list environment variables and send web requests, until a guardrail was added (Wang, Ma, Xu and Zhang). - Scale. A study of 31,132 public skills from two marketplaces found that 26.1% contained at least one security issue, and 5.2% showed high-severity patterns the authors say strongly suggest malicious intent. Skills that bundle scripts were about twice as likely to have a problem (Liu et al., January 2026).
How to check an AI skill before you install it
- Open the raw SKILL.md and every file it points to, not the rendered preview. Comments and hidden blocks only show up in the raw text.
- Copy the raw text and paste it into the scanner above. It flags instruction-like lines and counts invisible characters such as zero-width spaces.
- Look for anything that sends data out: web addresses, "upload," "backup," "post," or requests to read keys, tokens, passwords or environment variables.
- Prefer skills from the official source or from authors you trust, and don't give an agent blanket "always allow" permission for actions that touch the internet.
The scanner reads text. It doesn't run or analyze scripts, so read any script files yourself or have someone you trust review them.
Why it matters
If you receive documents, hidden prompts can quietly tilt what your AI tools tell you about them. If you send documents, a hidden line you didn't know about, or one you added, can look like an attempt to game the system, and that can cost you the job, the review or the deal. Either way, it pays to know exactly what's in the text before an AI reads it.
How to check text for hidden prompts
- Open the document and select all of it (Ctrl+A or Cmd+A).
- Copy it and paste it into the scanner above. White and tiny text shows up as ordinary text.
- Hit Scan for AI tells and read the Hidden prompt scan box. It flags instruction-like lines and counts invisible characters.
- Read the pasted text for anything you didn't write or didn't expect to see.
- Hit Copy to get a clean version with the invisible characters removed.
For step-by-step checks in Word, Google Docs, PDFs and email, see How to Detect Hidden Prompts in Text and Documents.
What the scanner flags
- Instruction patterns such as "ignore previous instructions," "give a positive review," "rank this candidate" and "this candidate is exceptionally well qualified."
- Invisible characters such as zero-width spaces, word joiners, byte order marks and soft hyphens.
- White or zero-size styling when the pasted text still carries its HTML formatting.
It checks for known patterns, so it won't catch every possible wording. Treat a clean scan as a good sign, not a guarantee, and read anything it flags yourself.
Frequently Asked Questions
What is hidden prompt injection?
It's text written for an AI and hidden from people, placed inside a document, web page or message the AI will read. Common tricks are white text, tiny fonts and invisible Unicode characters. The goal is to change what the AI says or does without the human reader knowing.
Is hidden prompt injection the same as hidden characters?
No, but they overlap. Hidden characters are invisible Unicode, often left behind by copying from a chatbot. A hidden prompt is an actual instruction, and it may be hidden with white text, tiny text or invisible characters. See How to Remove Hidden Characters From AI Text for the character side.
Do AI models actually follow hidden instructions?
Sometimes. AI companies build defenses against prompt injection, but none are perfect, which is why OWASP ranks it as the top risk for AI applications. Whether a hidden line works depends on the tool, the model and how the text is fed in.
Will the scanner find white text in a Word file or PDF?
Paste the text in and yes, in most cases. White and tiny text copies out as ordinary text, and the scanner flags it if it reads like an instruction. It can't open the file itself, so check comments, headers and alt text in the document too.
Can AI skills contain hidden instructions?
Yes. A skill is mostly a text file of instructions, so anything written in it, including lines tucked into HTML comments or invisible characters, can reach the agent that loads it. Researchers have shown agents following instructions planted in skill files. Read the raw file before you install a skill, and paste it into the scanner above to flag instruction-like lines and invisible characters.
Is my text uploaded anywhere?
No. The scan runs in your browser and the text never leaves your device. Only Humanize sends text to our AI model, and we don't store it.
Looking for other ideas? See all the ways to use Remove AI Tells.