Discord formats text with Markdown: wrap words in symbols such as **bold**, *italics*, __underline__ and ~~strikethrough~~, start a line with # for a header or -# for small text, and wrap code in backticks. Colored text is not a built-in option, but an ansi code block shows colors on the desktop app.
Below is every format Discord supports in messages, with the exact syntax, the small rules that make them fail, and what works on mobile.
Quick reference
| What you want | Type this |
|---|---|
| Italics | *italics* or _italics_ |
| Bold | **bold** |
| Bold italics | ***bold italics*** |
| Underline | __underline__ |
| Underline italics | __*underline italics*__ |
| Underline bold | __**underline bold**__ |
| Strikethrough | ~~strikethrough~~ |
| Big header | # Header |
| Medium header | ## Header |
| Small header | ### Header |
| Small grey text (subtext) | -# small text |
| Bulleted list | - item or * item |
| Masked link | [link text](https://example.com) |
| Inline code | `code` |
| Single-line quote | > quote |
| Multi-line quote | >>> quote |
Spoilers use two vertical bars on each side, like ||hidden text||. On desktop, Ctrl+B, Ctrl+I and Ctrl+U (Cmd on Mac) apply bold, italics and underline to selected text.
Bold, italics, underline and strikethrough
These are the basic styles from Discord's Markdown Text 101 guide. You can stack them: ***text*** is bold italics, and adding double underscores outside, as in __***text***__, underlines it too. Underline uses two underscores, while a single underscore on each side gives italics, so the two are easy to mix up.
Headers
Start a line with one, two or three # characters followed by a space:
# Big header
## Smaller header
### Smallest header
Two rules decide whether a header works. The # has to be the very first character on the line, and there has to be a space between it and your text. #Header without the space stays plain text.
Small text (subtext)
Discord calls this subtext. Start a line with -# and a space:
-# This line appears small and grey
Like headers, it only works at the very start of a line. It is handy for footnotes, credits, or "edited" notes under a longer message.
Lists
Start each line with - or * and a space to make a bulleted list. Add two spaces before the dash to indent a line under the one above it:
- Rules
- Be kind
- No spam
- Roles
Numbered lists work the same way with 1., 2. and so on. Again, the space after the marker is required.
Masked links
Put the text you want people to see in square brackets, then the URL in round brackets:
[Read the server rules](https://example.com/rules)
The text becomes a clickable link. Masked links are useful in announcements, but members are right to hover over or long-press a link to check where it goes before clicking, especially in DMs.
Block quotes
Start a line with > and a space to quote a single line. To quote everything after it in the same message, start with >>> instead:
>>> Everything from here
to the end of the message
is quoted.
Code and code blocks
Wrap text in single backticks for inline code: `like this`. For several lines, put three backticks on the line before and after:
```
line one
line two
```
Add a language name right after the opening backticks to get syntax colors on desktop:
```py
print("hello")
```
Code blocks also switch off all other formatting inside them, which makes them the easiest way to show symbols like ** without Discord turning them into bold.
Spoilers
Wrap text in two vertical bars on each side, for example ||the ending||, or type /spoiler before your message. On desktop you can also highlight text and click the eye icon. Discord's Spoiler Tags guide adds a few details:
- Images, videos and other attachments can be marked as spoilers with the eye icon before you send them.
- Links can be hidden by wrapping the URL in the same bars.
- Spoiler bars do not hide text inside a code block.
- Server invite embeds cannot be hidden with spoiler tags.
- The same
||text||syntax works on mobile, and on iOS you can select text and tap Mark as Spoiler.
Colored text with ansi code blocks
Discord has no color option for normal messages, but code blocks marked ansi understand terminal color codes. Each color starts with the escape character, written below as \u001b, followed by [, a format code, a semicolon, a color code and m:
```ansi
\u001b[0;31mThis text is red\u001b[0m
\u001b[1;32mThis text is bold and green\u001b[0m
```
\u001b[0m resets back to normal.
| Code | Meaning |
|---|---|
| 0 | Normal |
| 1 | Bold |
| 4 | Underline |
| 30 | Gray text |
| 31 | Red text |
| 32 | Green text |
| 33 | Yellow text |
| 34 | Blue text |
| 35 | Pink text |
| 36 | Cyan text |
| 37 | White text |
| 40 to 47 | Background colors |
Two catches:
- You cannot type the escape character on a keyboard.
\u001bis how a bot writes it in code. If you are typing in Discord yourself, copy the real character from a colored-text generator and paste it in. - It only shows on desktop. Guides that track this feature note that ansi coloring reached the stable desktop clients but not mobile, where the block shows as plain text.
A simpler trick uses the diff language: lines starting with + show green and lines starting with - show red. It renders on desktop; mobile support has varied over time, so check it on a phone before you rely on it for something important.
Timestamps that show in everyone's time zone
You can drop a date into a message that every reader sees in their own local time. The format is <t:UNIX_TIMESTAMP:STYLE>, where the timestamp is the number of seconds since 1 January 1970 (UTC) and the style is a single letter:
| Style | Example output |
|---|---|
t | 16:20 |
T | 16:20:30 |
d | 20/04/2021 |
D | April 20, 2021 |
f (default) | April 20, 2021 at 16:20 |
F | Tuesday, April 20, 2021 at 16:20 |
R | 4 years ago |
The R style counts up or down live, which makes it a good fit for event start times.
Escaping formatting
To show a symbol instead of having Discord format it, put a backslash in front of it. \*not italic\* displays the asterisks as they are. Inside code blocks the backslash is not needed, and it would show up as a literal backslash.
Fancy fonts
Discord's own command guide says it "doesn't have built-in font commands." The script, bubble and bold-serif styles you see in usernames, bios and channel names are Unicode characters that look like letters, copied in from a generator. Use them for decoration rather than whole messages: screen readers often read these characters poorly, and they cannot be searched like normal text.
Where formatting works
Markdown works in messages on both desktop and mobile, with the ansi colors above as the main exception. Your profile's About Me also accepts Markdown and links, within its 190 character limit. Bots can use the same Markdown inside embed descriptions; see our Discord embed guide for that side of things.
Frequently asked questions
How do I make small text on Discord?
Start a new line with -# followed by a space, then your text. It has to be at the very beginning of the line.
Why is my Discord header not working?
There is probably no space after the #, or the # is not the first character on the line. # Title works, #Title does not.
Can I change the text color in Discord?
Not in normal messages. You can get colors inside a code block using the ansi language and terminal color codes, which display on desktop but not on mobile.
How do I underline text in Discord?
Wrap it in two underscores on each side: __underlined__. You can also select the text on desktop and press Ctrl+U (Cmd+U on Mac).
How do I stop Discord from formatting my asterisks?
Put a backslash before each symbol, like \*, or put the text in a code block, where no formatting applies.
