How Whitespace turns blank characters into instructions

In Whitespace, a command is not a visible word or symbol. It is a short pattern made from three characters: space, tab, and line break. The pattern determines what the interpreter should do. For example, one sequence can put a number on the program’s stack—a pile of values the program works with—while other sequences can perform arithmetic or change which instruction runs next.

The line breaks matter as much as the spaces and tabs. Together, these characters form the language’s instructions, so removing or rearranging even an apparently empty character can change the program’s behavior.

The text around the program is camouflage, not code

A Whitespace interpreter ignores ordinary letters, numbers, and punctuation. That lets a programmer place a working sequence of commands between the visible characters of an otherwise ordinary-looking document. The visible text is not secretly being interpreted as instructions; it is simply skipped while the interpreter follows the blank-character patterns.

This unusual design also makes Whitespace fragile to handle. A text editor or messaging app might replace tabs with spaces, trim trailing spaces, or alter line breaks. Any of those changes can damage the hidden sequence without making the page look noticeably different. To preserve a program, its whitespace must be preserved exactly.

Hidden does not mean secure

Whitespace can make code difficult to notice at a glance, but it does not encrypt or protect it. Anyone who runs the text through a Whitespace interpreter—or inspects its spaces, tabs, and line breaks—can reveal what it does. Its real trick is a change in what counts as visible: a page that looks empty of instructions can still contain a complete program.