Hidden characters and AI prompt injection in shared text
4 min read
When you copy text from a message, you assume that what you see is what you get. That is not always true. Unicode includes many characters that take no visible space, or that change how text is displayed, and attackers can use them.
What invisible text can do
- Zero-width characters can be inserted into words or commands without changing how they look, which can break copy-and-paste or help track who leaked a message.
- Bidirectional control characters change the display direction of text, so what is shown on screen can differ from the order of characters that actually run when pasted.
- "Tag" characters from a special Unicode block are invisible in most interfaces, yet some AI systems can read them.
- Padding with large amounts of blank space can push extra content outside the visible area of a text box.
Why AI tools make this more important
If you paste text from an untrusted sender into an AI assistant, hidden or visible instructions inside that text may be treated as instructions to the assistant. This is called prompt injection. It matters most when the assistant can take actions, such as browsing, reading files or sending messages.
An AI agent that opens a link on your behalf could also read hidden text on the page it finds.
How to protect yourself
- Do not run commands copied from a message unless you have read and understood them. Paste into a plain text editor first.
- Do not feed text from unknown senders into AI tools that have access to your data or accounts.
- Do not let automated agents open one-time links. Opening one consumes the secret.
- Treat unexpected instructions, even inside a "secret", with the same suspicion you would give an unexpected email.
On this site
One-Time Link shows secrets as plain text in a read-only box. It never inserts them into the page as HTML, and the site's Content Security Policy blocks scripts that do not come from the site itself. It does not use AI, so hidden text cannot influence the service. What the recipient does with the text afterwards is up to them, so stay careful.