Discord Text Formatting: The Complete Syntax Cheat Sheet
The complete Discord formatting cheat sheet: copy-paste syntax for bold, underline, strikethrough, spoilers, colored text, headers, code blocks, and subtext.
On Discord, the formatting characters you type render live in the message you send—there is no separate preview step, so the gap between styled text and a row of visible asterisks is a single character. This is a copy-paste cheat sheet for Discord text formatting: the exact syntax for styles like bold, underline, spoilers, colored text, and headers, so you can look one up instead of guessing at it.
Bold, italic, underline, and strikethrough
These four wrappers cover most Discord message formatting. Each surrounds your text with a symbol on both sides, and they nest, so you can stack them.
- Bold: two asterisks each side — `**bold**`.
- Italic: one asterisk or one underscore each side — `*italic*` or `_italic_`.
- Bold italic: three asterisks each side — `***text***`.
- Underline: two underscores each side — `__text__`.
- Strikethrough: two tildes each side — `~~strikethrough~~`.
To underline text in Discord, wrap it in two underscores: `__text__`. The gotcha: a single underscore is italic (`_italic_`) but a double underscore is underline—unlike standard Markdown, where `__text__` means bold. Because `_` can also misfire inside words like snake_case, reach for asterisks when you want italic. Wrappers combine cleanly, so `__**bold underline**__` and `__*italic underline*__` both work.
Spoilers, quotes, and lists
Discord also lets you hide text, quote context, and structure a message so people can scan it.
- Spoiler tags: wrap text in double pipes — `||the butler||` — and it renders as a black bar readers click or tap to reveal.
- Block quote: start a line with `> ` to quote a single line or paragraph.
- Multi-line quote: start with `>>> ` to quote everything from there to the end of the message.
- Bulleted list: begin a line with `- ` or `* `, and indent two spaces to nest sub-items.
- Numbered list: begin a line with `1. `; Discord auto-corrects the sequence, so `1.` on every line still renders 1, 2, 3.
Line-anchored formats—quotes, list markers, headers, and subtext—only work at the very start of a line, and `> ` needs its trailing space. None of them fire mid-line or inside a code block.
Inline code and code blocks
Code spans are for commands, filenames, and anything you want shown as-is in monospace.
- Inline code: single backticks around a short snippet — `npm install` — renders monospace and disables every other markdown character inside it.
- Code block: triple backticks on their own lines, above and below your text, for a multi-line monospace block that preserves whitespace.
- Syntax highlighting: add a language identifier right after the opening triple backticks — `python`, `js`, `json`, `bash`, `sql`, `diff`, and many more — to color-code logs, config, and snippets.
Because code spans disable other markdown, they double as the cleanest way to show formatting characters literally—handy when you want readers to see `**asterisks**` on the screen instead of bold text.
Colored text with ANSI code blocks
Discord can render colored text, but only through one specific trick: an `ansi` code block—triple backticks with `ansi` as the language tag—combined with standard ANSI escape codes wrapped around your text.
- Style codes: 0 resets, 1 is bold, 4 is underline.
- Foreground colors: 31 red, 32 green, 33 yellow, 34 blue, 35 pink, 36 cyan, 37 white (30 is gray).
- Background colors: 41 red, 42 green, 43 yellow, 44 blue, and so on up through 47.
Two practical caveats: each color needs an ESC control character (U+001B) that you cannot type on a normal keyboard—copy it from a working example or use a generator—and mobile support is inconsistent, so many mobile clients still render the block as plain, colorless monospace. If your audience is mobile-heavy, don't rely on ANSI color; fall back to bold and italic. For the full color reference, worked examples, and troubleshooting, see the Discord colored text guide.
Headers and subtext (Discord's newer syntax)
More recent additions bring document-style structure to longer messages and announcements.
- Headers: `# ` for a large title, `## ` for a section, `### ` for a subsection—three sizes only, each at the start of a line followed by a space (there is no H4).
- Subtext: `-# ` renders small, muted gray text, good for captions, disclaimers, and footnotes.
- Masked links: `[read the docs](https://example.com)` shows clean link text instead of a raw URL, with no space allowed between the `]` and the `(`.
Masked links work in most current clients now, not just bot embeds, though clicking one shows a short safety prompt the first time you visit a domain.
Because Discord renders every formatting mistake instantly, in front of your whole server, it helps to draft where you can check the result first. Markdown2Social shows you the exact Discord rendering and gives you a clean version to paste—useful for announcements and anything cross-posted from another platform. Treat this page as the syntax reference; for when and how to use these styles in a real announcement, see the companion guide, How to Format Discord Messages with Markdown. And watch your length: Discord caps messages at 2,000 characters (4,000 with Nitro), and every markdown and ANSI character counts toward it.