Markdown Escape Character
How to escape special markdown characters with a backslash to display them literally. Syntax, examples, and which characters need escaping.
What is markdown escape character?
The backslash (\) is markdown's escape character. Placing a backslash before a markdown special character causes it to be displayed literally instead of being interpreted as formatting syntax. This is essential when you need to show asterisks, hashes, underscores, or other special characters as plain text.
Syntax
Escape asterisk
Show asterisks literally without triggering bold or italic formatting.
Escape hash
Prevent a hash at the start of a line from becoming a heading.
Escape backtick
Display backticks without triggering code formatting.
Platform support
| Platform | Supported | Notes |
|---|---|---|
| GitHub | Yes | — |
| GitLab | Yes | — |
| Discord | Yes | — |
| Slack | Yes | — |
| Notion | Yes | — |
| Obsidian | Yes | — |
Common mistakes
*literal*
\*literal\*
Without escaping, asterisks will be interpreted as italic markers. Escape both the opening and closing asterisk.
\\
\\\\
To display a literal backslash, escape the backslash itself: \\ renders as \.
Tips for escape character
These characters have special meaning and may need escaping: \ ` * _ { } [ ] ( ) # + - . ! |
A # only needs escaping at the start of a line (where it would become a heading). Mid-sentence, # renders literally without escaping.
Frequently asked questions
Everything you need to know.
How do I display a literal asterisk in markdown?
Precede the asterisk with a backslash: \* renders as a literal *. You need to escape both opening and closing asterisks if they would otherwise form bold or italic.
Related elements
Inline Code
Inline code is formatted by wrapping text in single backticks (`). It renders in a monospace font with a subtle background, making it ideal for variable names, commands, file paths, and short code snippets within a sentence.
Bold
Bold text in markdown is created by wrapping words with double asterisks (**) or double underscores (__). Bold draws attention to important words and phrases, making your content easier to scan.
Italic
Italic text in markdown is created by wrapping words with a single asterisk (*) or single underscore (_). Italics are used for emphasis, titles of works, technical terms, and foreign words.
Try it in the editor
Paste your markdown and see escape character rendered instantly with professional themes.