Guide
Making Discord spoilers and coloured ANSI text
Discord’s formatting goes beyond bold and italic. Two features stand out: spoilers, which hide text until someone clicks it, and coloured text, which uses a trick with code blocks and ANSI escape codes. Neither is obvious, and the second needs invisible control characters. This formatter writes both for you from plain text.
Spoiler text
In spoiler mode, each line you type is wrapped in two vertical bars on each side, ||like this||. Discord shows the text as a dark bar, and a reader clicks it to see the words. Empty lines are left empty, so a multi-line message keeps its shape. Use it for plot details, answers to puzzles, results of matches and anything that people should choose to see.
Coloured text
In coloured mode the tool writes a code block marked ansi and puts escape sequences before each piece of text. You choose the text colour, a background, and whether the text is bold or underlined. The code block syntax is what Discord’s desktop and web apps read to colour the text. The text colours are gray, red, green, yellow, blue, pink, cyan and white, and the background menu offers none, dark blue, orange, blue grey, grey, light grey, indigo and white.
Rainbow
The rainbow switch gives each word its own colour in turn, cycling through the palette. It is a quick way to make a banner or a joke message stand out. Words are coloured separately, and the bold and underline choices apply to all of them. For serious announcements, one colour and bold are usually enough.
The copy button
The escape sequences begin with an invisible ESC character that cannot be typed on a keyboard. If you retype or edit the text in a plain text editor, those characters can be lost, and the colours disappear. Use the Copy button in the tool, paste straight into Discord and edit only the words between the sequences. A note under the result explains this.
Code block mode
The third mode wraps your text in an ordinary code block with no colour. It keeps spaces and line breaks exactly, which is handy for tables, ASCII art and command lines. The 2,000-character limit of a Discord message applies to everything, including the sequences and the three backticks, so long coloured text uses more room than it appears.
A worked example
The sample text is “Race day is Sunday!” on one line and “Bring snacks.” on the next. In spoiler mode the output is ||Race day is Sunday!|| and ||Bring snacks.|| on two lines, and the result row says 41 characters. In coloured mode with red bold text, the output starts with a line of three backticks and ansi, then each word wrapped in the red bold sequence, 111 characters in all. With the rainbow switch on, “Race” is red, “day” green, “is” yellow, “Sunday!” blue, and the next line continues through pink and cyan.
Limits
The result depends on Discord’s rendering, which differs between apps and may change. Colour does not appear in notifications, search results or some third-party clients. The tool does not post messages, check the length against server rules or support custom colours outside the standard palette. Test in a private channel before using coloured text in an important announcement.
Related tools
- Discord Embed Builder makes richer announcements with fields and images.
- Discord Timestamp Generator adds time codes that show each reader their own time.
- WhatsApp Text Formatter styles messages in another chat app.
- Telegram Link & Escape Tool escapes text for Telegram.
Checked against the current version of the Discord Text Formatter on .

