Advanced Elements·18 / 19

Escaping Characters

Display special Markdown characters as literal text.

Escaping Characters

Sometimes you want to display special Markdown characters literally, without them being interpreted as formatting.

The Backslash

Use a backslash \ before any special character:

\* This is not a list item
\# This is not a heading
\**This is not bold\**

Characters You Can Escape

CharacterName
\Backslash
```Backtick
*Asterisk
_Underscore
{}Curly braces
[]Square brackets
()Parentheses
#Hash
+Plus sign
-Hyphen
.Period
!Exclamation mark
``

Common Scenarios

Showing Markdown Syntax

To make text bold, wrap it in \*\*double asterisks\*\*.

Using Special Characters in Text

The price is \$100.
Use the C\# programming language.

In Code Blocks

Characters inside code blocks (backticks) don't need escaping:

`**this stays as-is**`

💡 When in doubt, use a backslash! It won't hurt if the character didn't need escaping.

Practice

Markdown Input
Live Preview

Escaping Practice

*This is not italic*

# This is not a heading

[This is not a link](https://example.com)

The price is $50 and the discount is 20%.

Show a pipe: | in text.