Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

Bold **bold**

Underline bold __**underline bold**__

Bold Italics ***bold italics***

underline bold italics __***underline bold italics***__

Underline __underline__

Strikethrough ~~Strikethrough~~

Don't want to use markdown? You can slap a backslash in front of your statement, or put your message in a code block, and it'll escape the markdown formatting. You'll see those asterisks as you'd like! Just keep in mind, it doesn't work in messages with edits or underscores.

Block Quotes

The syntax to use Block Quotes is > or >>> followed by a space.

> at the beginning of a line of text, creates a single-line block quote.

one line block quote

>>> at the beginning of a line of text, creates a multi-line block quote. All text from >>> until the end of the message will be included in the quote.

multiline block quote

Code Blocks

Discord also supports code blocks as well. You can make your own code blocks by wrapping your text in backticks (`)

one line code blocks

You can also use three backticks (```) to create multiline code blocks, like this beautifully written haiku.

multiline code blocks

Syntax Highlighting

If you really want to spruce up your code blocks, you can denote a specific language for syntax highlighting, by typing the name of the language you want the code block to expect right after the first three backticks beginning your code block. An example...

syntax highlighting

There are many different languages in place of Markdown that Discord's syntax highlighting support. Each different language has its own approach to highlight-able syntax. For a full list: https://highlightjs.org/static/demo/. Note that you won't be able to view syntax highlighting on the mobile app.

asciidoc

asciidoc

autohotkey

autohotkey

bash

bash

coffeescript

coffeescript

cpp (C++)

cpp

cs (C#)

cs

css

css

diff

diff

fix

fix

glsl

glsl

ini

ini

json

json

md (markdown)

md

ml

ml

prolog

prolog

py

py

tex

tex

xl

xl

xml

xml

And you get the idea! Now you're a Discord text markdown expert. Get out there and highlight your statements!

Acknowledgements

Hammer and Chisel
Discord Highlight.js

A special thanks to Frosty#9449 for their help in making this guide.

If you have any questions or want to get in contact with me, you can add Matthew#2334 on Discord or join my support server.

@almeidx
Copy link

almeidx commented Jun 9, 2021

Does anyone know how to multiline code block with a Discord bot (js)?

Same way you would do it yourself

@PuffinKwadraat
Copy link

PuffinKwadraat commented Jun 9, 2021

But that doesn't work. I really need to have the code multiline. Im trying to display it in an embed. Can you use
?

@almeidx
Copy link

almeidx commented Jun 9, 2021

But that doesn't work. I really need to have the code multiline. Im trying to display it in an embed. Can you use
?

Use template literals or \n

@PuffinKwadraat
Copy link

PuffinKwadraat commented Jun 9, 2021

Ok, thank you for your fast response. Imma try it out.

@ThaMessia
Copy link

ThaMessia commented Jun 21, 2021

may I suggest to add HolyC and Assembly to discord?

You can, but it isn't related to this gist

Also, x86asm is supported

At what gist must I tell to add HolyC ?

@almeidx
Copy link

almeidx commented Jun 21, 2021

may I suggest to add HolyC and Assembly to discord?

You can, but it isn't related to this gist
Also, x86asm is supported

At what gist must I tell to add HolyC ?

https://highlightjs.readthedocs.io/en/latest/language-requests.html

@piano1029
Copy link

piano1029 commented Jun 30, 2021

A new type of markdown that I have recently discovered is <t:UNIXTIMESTAMP:f>, it allows displaying a Unix timestamp with the user's prefrences. The only preference that I know of is supported right now is 24h or AM and PM. (And language of course)
image

@almeidx
Copy link

almeidx commented Jun 30, 2021

@MA24th
Copy link

MA24th commented Jul 2, 2021

What about inline list

@byggames
Copy link

byggames commented Jul 4, 2021

Mmm, el resaltado de texto parece haber cambiado, ¿puedes confirmarlo? Esto

```tex
Everything is highlighted```

produce

imagen

cuando lo intento.

EDITAR: gracias @troffaholic, de hecho es el $ :)

Hola a mi me da problema para poder hacer esto, alguien me dice como lo soluciono, un saludo

@mjeveritt
Copy link

mjeveritt commented Jul 27, 2021

Is there any sign of list markdown happening soon? ie. bulleted/numbered lists?! 😃

@almeidx
Copy link

almeidx commented Jul 27, 2021

no

@RasAlhag
Copy link

RasAlhag commented Sep 24, 2021

add ||Spoiler text|| in Discord
and Non-embedded URLs < https://domain.com > using "<" ">"

@K0media
Copy link

K0media commented Sep 26, 2021

Will hotkeys (on desktop) and markdown buttons (on mobile) ever be added to ease the text formatting?

@OllySwan
Copy link

OllySwan commented Oct 19, 2021

Nice thanks for this!

@Ghostridr
Copy link

Ghostridr commented Dec 15, 2021

This has been very useful since I'm on Discord a lot. Thank you.

@kkrypt0nn
Copy link

kkrypt0nn commented Jan 7, 2022

There is a new update being rolled out for custom colors in code blocks using ANSI color codes.
You can see my gist here on how to use them: https://gist.github.com/kkrypt0nn/a02506f3712ff2d1c8ca7c9e0aed7c06

@kkrypt0nn
Copy link

kkrypt0nn commented Jan 19, 2022

The "YAML" only shows up because you are using a BetterDiscord theme/plugin, which is by the way against Discord's Terms of Service and can get your account terminated..
You cannot put colors in an embed without specifying a language to use.

@driver1848
Copy link

driver1848 commented Jan 29, 2022

Just wanted to add, that there is also a java option for the code blocks.

@Yash-Singh1
Copy link

Yash-Singh1 commented Feb 8, 2022

I made a discord bot that lets you do that: https://github.com/Yash-Singh1/mermaidjs-discord.

@RedStone576
Copy link

RedStone576 commented Feb 9, 2022

seems like they now has added yaml format

image

@adorabletrooper
Copy link

adorabletrooper commented Feb 24, 2022

How can I color Block Quotes?

@kkrypt0nn
Copy link

kkrypt0nn commented Feb 25, 2022

YAML has been on Discord for a long time. Has just not been added to this guide for some reason?

@Defirence
Copy link

Defirence commented Mar 13, 2022

seems like they now has added yaml format

image

NICE

@HarleyVader
Copy link

HarleyVader commented May 1, 2022

markdown has gotten me into trouble for downmarking something i should have marked down

@SrinSS01
Copy link

SrinSS01 commented May 8, 2022

can we create tables as well?

@kkrypt0nn
Copy link

kkrypt0nn commented May 8, 2022

can we create tables as well?

Nope

@SpencerTinnin
Copy link

SpencerTinnin commented May 10, 2022

Is there a way to add syntax highlighting to an inline/single-line code block?

@kkrypt0nn
Copy link

kkrypt0nn commented May 11, 2022

Is there a way to add syntax highlighting to an inline/single-line code block?

If you mean this, nope

@iOrange
Copy link

iOrange commented May 11, 2022

Need an HLSL support, esp. since there's GLSL support already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment