Tool to decode / code in whitespace, an exotic programming language that only uses blank / invisible characters like space, tab or newline/line feed.
Whitespace Language - dCode
Tag(s) : Programming Language
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Whitespace is an esoteric programming language that gets its name from the fact that only three characters are significant in its source code: the space (0x20), the tab (0x09), and the line feed (0x0A).
All other visible characters (letters, numbers, punctuation, etc.) are ignored by the interpreter.
A Whitespace program may therefore appear empty or contain innocuous text, while the actual instructions are encoded within the whitespace characters. The code is not absent, but invisible to the naked eye.
To make the code readable by the user, it is common to represent: S for Space, T for Tab, and L for Line Feed.
This is the opposite of most programming languages, in which spaces/empty/blank are generally ignored or used only for formatting.
Whitespace is an imperative language based on a stack and a heap. Execution relies on structured instructions, each beginning with a prefix called an IMP (Instruction Modification Parameter). There are 5 categories of IMPs: S (space) modifies the stack, TS (tab+space) performs a calculation, TT (tab+tab) accesses the heap, L (newline) handles goto/jump statements, and TL (tab+newline) handles input/output.
The complete list of 22 Whitespace instructions:
| IMP + Command | Parameter | Description |
|---|---|---|
| S S | Number | Stacks the number |
| S LS | Copy top of stack | |
| S LT | Reverse the top two items of the stack | |
| S LL | Remove top of stack | |
| TS SS | Addition | |
| TS ST | Subtraction | |
| TS SL | Multiplication | |
| TS TS | Integer Division | |
| TS TT | Modulo | |
| TT S | Save to heap | |
| TT T | Get the heap | |
| L SS | Label | Create a label in the program |
| L ST | Label | Label call |
| L SL | Label | Jump to the label |
| L TS | Label | Jump to label if top of stack is 0 |
| L TT | Label | Jump to the label if the top of the stack is <0 |
| L TL | End of the subroutine, and return | |
| L LL | End of program | |
| TL SS | Show top of stack as ASCII character | |
| TL ST | Display top of stack as an integer | |
| TL TS | Read a character and save it at the address described by the top of the stack | |
| TL TT | Read a number and store it at the address described by the top of the stack |
The numbers respect a specific syntax: sign + absolute values in binary + line feed. The sign is S (space) for positive or T (tabulation) for negative. The value of the number is written in binary with S (space) for 0 and T (tabulation) for 1.
Example: The number +97 is positive (coded S) and has the binary value 1100001 (coded TTSSSST), so it is coded as S TTSSSST L
Example: SS STTSSSSTL TLSS corresponds to the instruction stacks the number 97 and displays it as an ASCII character, so the program displays a.
Decoding whitespace involves sequentially reading significant characters (spaces, tabs, line breaks), identifying IMPs, and then interpreting instructions according to the language specification.
dCode uses WS2JS, a JavaScript interpreter by Luilak (MIT License) here (Execution occurs in the user's browser). dCode offers the ability to read a file (usually with the .ws extension) or copy and paste a program (be careful not to unintentionally add a space or line break, as this could cause errors).
The message is invisible, consisting only of spaces, tabs and newlines.
Sometimes the characters S, T and C accompany the code.
The code can be hidden within ordinary text because all visible characters are ignored by the interpreter. This is a technique called steganography: the information is hidden within the invisible structure of the file.
Whitespace language was designed as an esoteric programming language, meaning it is not intended to be used as a practical tool, but rather as a way to challenge and amuse programmers.
Whitespace was described on April 1, 2003 by Edwin Brady and Chris Morris (as an April Fool) at Durham University.
dCode retains ownership of the "Whitespace Language" source code. Any algorithm for the "Whitespace Language" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Whitespace Language" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Whitespace Language" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Whitespace Language" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Whitespace Language on dCode.fr [online website], retrieved on 2026-03-01,