Skip to content
Escaping Characters

A backslash placed immediately before a Markdown character tells the parser to treat it as a literal character rather than as formatting syntax. This is called 'escaping'.

Syntax
MARKDOWN
\*not italic\*

\# not a heading

\[not a link\]
Output

*not italic*

# not a heading

[not a link]

Which characters can be escaped?

The following characters have special meaning in Markdown and can be escaped with a backslash:

Character Name
\ Backslash
` Backtick
* Asterisk
_ Underscore
{ } Curly braces
[ ] Square brackets
( ) Parentheses
# Hash
+ Plus sign
- Hyphen
. Full stop
! Exclamation mark
\| Pipe
Best Practice
  • Escape only when necessary — if a character is not causing formatting problems, leave it as-is.
  • If you find yourself escaping frequently, consider whether a code span (`...`) is a cleaner way to present the content.

Markdown Flavour Support

Supported by all major flavours.

Flavour Support Detail
Flavour Support Notes
Original Markdown Yes Backslash escaping defined in the original spec.
CommonMark Yes Fully specified; the complete list of escapable characters is defined explicitly.
GitHub Flavored Markdown Yes Follows CommonMark.
Pandoc Markdown Yes Follows CommonMark; also supports escaping inside raw blocks.

Practical Examples

  • Displaying an asterisk in a recipe without triggering bold or italic: A recipe step that starts with an asterisk can be written literally by escaping it.
Syntax
MARKDOWN
\* Add a pinch of salt and stir well.
Output

* Add a pinch of salt and stir well.

  • Writing a social media handle without creating a heading or emphasis: A username that contains @, #, or * characters can be displayed as plain text.
Syntax
MARKDOWN
Follow us at \#PracticalMarkdown for updates.
Output

Follow us at #PracticalMarkdown for updates.

© 2026 Docizr. All rights reserved.