Markdown Escape Characters: The Complete List

How to display literal markdown symbols using backslash escapes. Covers every escapable character with examples and common scenarios.

· · 5 min read

Last updated: March 1, 2026

markdown escape-characters reference

Markdown interprets certain characters as formatting instructions. To display these characters literally (as themselves, not as formatting), prefix them with a backslash \. This is called escaping.

Every Escapable Character

CharacterNameEscapedMarkdown Use
\Backslash\\Escape character itself
`Backtick\`Inline code
*Asterisk\*Bold, italic
_Underscore\_Bold, italic
{ }Curly braces\{ \}Some extended syntaxes
[ ]Square brackets\[ \]Links, images, footnotes
( )Parentheses\( \)Link URLs
#Hash\#Headings
+Plus\+Unordered lists
-Minus/Dash\-Unordered lists, horizontal rules
.Dot\.Ordered lists (after a number)
!Exclamation\!Images
``Pipe|
~Tilde\~Strikethrough
>Greater than\>Blockquotes

Common Scenarios

Showing Literal Asterisks

Without escaping, asterisks trigger bold or italic:

<!-- Renders as italic -->
*not what I wanted*
<!-- Shows literal asterisks -->
\*not formatted\*

Output: *not formatted*

Showing Hash Symbols

A # at the start of a line creates a heading:

<!-- Becomes a heading -->
# Not a heading
<!-- Shows the hash literally -->
\# Just a hash symbol

Showing Square Brackets

Square brackets start a link:

<!-- Creates a link attempt -->
[text](url)
<!-- Shows literal brackets -->
\[text\](url)

Showing Pipe Characters in Tables

Pipes define table columns. To include a literal pipe in a cell:

| Command | Description |
|---------|-------------|
| `a \| b` | Logical OR |

Inside code spans (backticks), pipes do not need escaping. Outside code spans, use \|.

Showing Backticks

To show a literal backtick, escape it or use double backticks:

<!-- Escaped -->
\`not code\`
<!-- Double backtick wrapper -->
`` `literal backtick` ``

The double-backtick approach is useful when you need to show a backtick inside inline code.

Showing Angle Brackets

Angle brackets create auto-links or HTML tags:

<!-- Creates an auto-link -->
<https://example.com>
<!-- Shows literal angle brackets (in some parsers) -->
\<not a link\>

In practice, HTML entities work more reliably for angle brackets: &lt; for < and &gt; for >.

What Does Not Need Escaping

Characters that are not on the escapable list do not need backslashes:

  • Regular punctuation (commas, semicolons, colons, question marks)
  • Quotation marks (single and double)
  • The @ symbol
  • The % symbol
  • The $ symbol
  • The & symbol (though &amp; works too)

Also, markdown characters only need escaping when they would trigger formatting:

<!-- No escaping needed: asterisk mid-word doesn't trigger formatting -->
5*3 = 15
<!-- Escaping needed: asterisk at word boundary triggers italic -->
\*important\*

Escaping Inside Code Blocks

Inside backtick code spans and fenced code blocks, markdown is not processed. You do not need to escape anything:

`**this is not bold**`

This renders as **this is not bold** with the asterisks visible.

Inside fenced code blocks:

```
# This is not a heading
*This is not italic*
[This is not a link](url)
```

Everything inside the code fence is literal text. No escaping needed.

HTML Entities as an Alternative

Instead of backslash escapes, you can use HTML entities:

CharacterHTML Entity
<&lt;
>&gt;
&&amp;
"&quot;
'&#39;

HTML entities work in all markdown parsers and in raw HTML. They are the safest option for angle brackets.

Platform Differences

FeatureGitHubVS CodeObsidianMDtoLinkCommonMark
Backslash escapesYesYesYesYesYes
All listed charactersYesYesYesYesYes
HTML entitiesYesYesPartialYesYes
Escape in code blocks neededNoNoNoNoNo

Escaping behavior is consistent across platforms because it is part of the core CommonMark specification.

FAQ

How do I show a literal asterisk in markdown?

Prefix it with a backslash: \*. This prevents the asterisk from triggering bold or italic formatting. Inside code spans (backticks), no escaping is needed.

Do I need to escape characters inside code blocks?

No. Code blocks (both inline backticks and fenced blocks) display all characters literally. Markdown formatting is not processed inside code.

What characters can I escape in markdown?

The backslash, backtick, asterisk, underscore, curly braces, square brackets, parentheses, hash, plus, minus, dot, exclamation mark, pipe, tilde, and greater-than sign. See the complete table at the top of this page.

How do I show angle brackets without creating an HTML tag?

Use HTML entities: &lt; for < and &gt; for >. Backslash escaping (\<) works in some parsers but is less reliable.

Try It Out

Practice escaping in the MDtoLink editor and see the results in real time. Publish your document to a shareable URL when it’s ready.

For the full syntax reference, see the markdown cheat sheet.


David Schemm
David Schemm

Founder, MDtoLink

David builds developer tools and writes about markdown workflows, documentation, and AI-assisted publishing.

Publish your markdown to a shareable URL

One command. Free to start. No credit card.