Discord Text Formatting Cheat Sheet (2026): Markdown, Colored Text, Timestamps
Every Discord formatting option on one page: bold, underline, spoilers, headers, subtext, lists, code blocks, colored text with ansi, and timestamps in all 9 styles. With free formatter and generator tools.
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.
Tools for this page: the Discord Text Formatter previews a message before you send it (and fixes pasted ChatGPT tables), the Discord Colored Text Generator builds colored ansi blocks, the Discord Spoiler Text Generator wraps a message, each word or each letter in spoiler tags, and the Discord Timestamp Generator makes <t:...> codes that show in each reader's timezone.
Deep dives: strikethrough, code blocks, small text and big text and hyperlinks each have their own page with the edge cases and fixes.
Quick reference
| You type | You get |
|---|---|
*italic* or _italic_ |
italic |
**bold** |
bold |
***bold italic*** |
bold italic |
__underline__ |
underlined text |
~~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.
For the tilde key on a phone, combining strikethrough with other styles and what to do in nicknames, see how to strikethrough on Discord.
Spoilers
Wrap text in two vertical bars on each side:
||this is hidden until someone clicks it||
For an image or file attachment, add it to the message and click the Mark as Spoiler eye icon on the attachment before you send. To hide a link and its preview, put the bars around the URL. Spoilers inside code blocks are not hidden.
You can also type /spoiler before a message, or select the text and click the eye icon in the popup toolbar. The Discord Spoiler Text Generator wraps a whole message, each line, each word or each letter for you, and its page covers images, links, mobile and the setting that turns spoilers off.
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
More on both, including why they sometimes show as plain text: Discord small text and big text.
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. Language names, the 2,000 character cap and common mistakes are in Discord code blocks.
Links
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>. See Discord hyperlinks for preview settings and links that will not turn clickable.
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.
Colored text
The only way to color text is a code block with the language set to ansi. Inside it, Discord reads terminal color codes: an escape character, [, numbers separated by semicolons, then m. 31 is red text, 32 green, 34 blue, 45 an indigo background, 1 bold and 0 resets.
```ansi
␛[0;31mThis is red␛[0m and this is normal
```
The ␛ is the invisible escape character (U+001B), which you cannot type on a normal keyboard. The Discord Colored Text Generator lets you select words, click a color and copy a ready-made block. Two caveats: Discord's own help pages do not document ansi blocks, so test before relying on it, and the result is still a monospace code block.
If you only need red and green, the older diff trick is simpler: lines starting with + are green and lines starting with - are red.
Timestamps
Discord's developer documentation defines a timestamp format that every reader sees in their own timezone and language: <t:UNIX_SECONDS:STYLE>. For example, <t:1796148000:F> is December 1, 2026 at 18:00 UTC, shown to a reader in New York as 1:00 PM and to a reader in Berlin as 19:00.
| Style | Discord's name | Example (Discord's docs) |
|---|---|---|
t |
Short Time | 16:20 |
T |
Medium Time | 16:20:30 |
d |
Short Date | 20/04/2021 |
D |
Long Date | April 20, 2021 |
f (default) |
Long Date, Short Time | April 20, 2021 at 16:20 |
F |
Full Date, Short Time | Tuesday, April 20, 2021 at 16:20 |
s |
Short Date, Short Time | 20/04/2021, 16:20 |
S |
Short Date, Medium Time | 20/04/2021, 16:20:30 |
R |
Relative Time | 4 years ago |
The s and S styles are recent additions, so older guides list only seven. The number must be in seconds, not milliseconds. The Discord Timestamp Generator converts a date and time in any timezone and shows a preview of every style.
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
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 in normal messages. There is no color syntax outside code blocks. See colored text below for the
ansicode block workaround.
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.