technique reference · by file type

Hidden text in plain text and Markdown files

A text file has no formatting to hide anything in, which makes it look safe. It is very often Markdown, though, and Markdown is very often rendered: a comment or a link title is in the file and on no page anybody reads. An AI model handed the file reads all of it.

We read a text file twice. Once as the text it is, and once as a browser would, so a span styled to be invisible is found even when it sits in the middle of a page of notes. Characters that draw nothing are covered on their own page, and apply here too.

txt.markdown-alt-textThe words in `![these words](picture.png)`: shown only where the picture fails to load, and read in full by any model handed the file.txttxt.markdown-unrenderedA Markdown comment, or the title of a link: in the file, read by every model handed the file, and shown by nothing that renders it.txttxt.terminal-controlEscape sequences, backspaces and carriage returns that a terminal obeys: show the file in a terminal and one document appears, hand the bytes to a model and it reads another.txt
other file types
Hidden text in PDF filesHidden text in Word documentsHidden text in Excel spreadsheetsHidden text in PowerPoint presentationsHidden text in emailHidden text on web pagesHidden text in RTF filesInvisible and hidden Unicode characters