The Escape Character
The backslash tells markdown to treat the next character as plain text rather than syntax:
\renders as (not bold or italic)\#renders as # (not a heading)\[renders as [ (not a link)- A backtick — use double backticks as the delimiter for your code span
Characters That Need Escaping
These characters have special meaning in markdown and may need a backslash: \ ` * _ { } [ ] ( ) # + - . ! |
Context matters — a # only needs escaping at the start of a line (where it would become a heading). Mid-sentence, # renders literally without escaping.
Common Use Cases
Showing asterisks: write\not bold\ to render not bold with literal asterisks.
Literal hash at start of line: write \# Not a heading to render # Not a heading.
Pipe in table cell: use \| when your table cell content contains a pipe character.
Code Blocks Are an Escape-Free Zone
You never need to escape characters inside backtick code spans or fenced code blocks. Content there is always displayed verbatim.
Showing a Literal Backslash
To display a backslash, escape it: write two backslashes — the first one escapes the second, and you get a single backslash in the output.
Full reference: Markdown Escape Characters.