Discord Markdown Guide: Bold, Spoilers, Headers, Code Blocks and What Doesn't Work

Every Discord text formatting option in one place: bold, italics, underline, spoilers, headers, lists, quotes, code blocks with syntax highlighting, masked links, and how to escape characters.

Discord uses its own flavor of Markdown. Most of the basics match what you know from GitHub or any other Markdown editor, but a few things are different: underline exists, spoilers exist, and tables and images do not. This page is a reference for what works in a Discord message today.

Quick reference

You type You get
*italic* or _italic_ italic
**bold** bold
***bold italic*** bold italic
__underline__ underlined text
~~strikethrough~~ strikethrough
`inline code` inline code
> quote single-line block quote
>>> quote quote that runs to the end of the message
# Heading large heading
-# small text small grey subtext
[text](https://example.com) masked link

You can combine them. __**bold underline**__ works, and spoilers (covered below) can wrap any other style.

Text styles

Wrap the text in the symbols on both sides, with no space between the symbol and the text:

*italic* or _italic_
**bold**
__underline__
~~strikethrough~~
***bold italic***
__***underline bold italic***__

The one that surprises people coming from other Markdown tools is underline. In standard Markdown, double underscores mean bold. In Discord, __text__ is underline and **text** is bold.

Spoilers

Wrap text in two vertical bars on each side:

||this is hidden until someone clicks it||

For an image or file attachment, tick "Mark as spoiler" in the upload dialog, or put SPOILER_ at the start of the file name.

Headers

Discord supports three heading levels at the start of a line, followed by a space:

# Large heading
## Medium heading
### Small heading

Headers need to be at the very start of the line. Indenting them or putting text in front of the # turns them back into plain text. Only three levels exist, so #### is not a heading.

For small, dim text under a message, start the line with -#:

-# This renders as small subtext

Lists

Start a line with - or * followed by a space for bullets, or use 1. for numbered lists. Indent two spaces to nest:

- First item
  - Nested item
- Second item

1. Step one
2. Step two

If you want a line that starts with a literal number and a period without it turning into a list, put a backslash before the period: 1\. text.

Quotes

> One-line quote

>>> Everything after this
is part of the quote,
including new lines.

> quotes one line. >>> quotes everything to the end of the message, which makes it the better choice for multi-paragraph quotes. You cannot close a >>> quote, so put it last in the message.

Code

Use single backticks for inline code and triple backticks for blocks. Add a language name right after the opening backticks to get syntax highlighting:

```js
const greeting = 'hello';
console.log(greeting);
```

Discord uses highlight.js for this, so common names like js, python, json, css, bash, diff and sql all work. The diff language is useful for showing changes, with lines starting + in green and - in red.

Formatting characters inside a code block are not interpreted, so it is also the easiest way to show someone the raw Markdown you typed.

Pasted URLs become links automatically. To show different text, use the masked link form:

[Markdown reference](https://www.markdowntools.com)

Masked links work in normal messages and in embeds. To stop Discord from generating a preview card, wrap the URL in angle brackets: <https://example.com>.

Escaping characters

Put a backslash in front of a formatting character to show it literally:

\*not italic\*
\_\_not underlined\_\_
\# not a heading

This is what you need when a username, filename or message contains underscores or asterisks that Discord keeps trying to format.

What does not work

  • Tables. Discord does not render Markdown tables. If you need a table in a message, put it in a code block so the spacing stays aligned. You can build and align one with the Markdown Table Formatter.
  • Images. The ![alt](url) syntax does nothing. Upload the image or paste its URL.
  • Horizontal rules. --- is shown as plain text.
  • HTML. Tags like <b> or <br> are not interpreted.
  • Task lists. - [ ] shows as literal text.
  • Colored text. There is no color syntax. The only colors come from code block syntax highlighting, which is a workaround rather than a feature.

Where the rules differ

Formatting is processed by the client. Bots and webhooks send the same Markdown, but embed descriptions and field values support a slightly different subset than normal messages (for example, masked links work in embed descriptions and field values but not in some other embed fields). If a bot message looks wrong, test the same text in a regular message first to see whether the problem is your Markdown or the embed.

For how Discord compares with GitHub, Slack, Notion and other tools, see the platform compatibility guide. If you are pasting Markdown from another tool into Discord, the Markdown to Plain Text converter strips the syntax Discord does not support. For the standard syntax behind these examples, see our posts on hyperlinks, strikethrough and underlining text.