Escaping characters in markdown
Put a backslash in front of a markdown character to show it rather than act on it. It is the way out when your text contains the same symbols markdown uses.
*not italic*
# not a heading
2 * 3 * 4
*everything here is literal*
The characters you can escape are \ ` * _ { } [ ] < > ( ) # + - . ! |. A backslash before anything else is just a backslash.
What usually goes wrong
- Inside a fenced code block, backslashes are literal: no escaping happens and none is needed.
- A year at the start of a line (
1994.) becomes a numbered list. Escape the dot:1994\. - A backslash at the end of a line is a line break, not an escape.
Where it behaves differently
It renders as written on GitHub, GitLab and VS Code preview. Everywhere else in this table it does something else, and that is worth reading before you paste.
| Platform | Behaviour |
|---|---|
| Obsidian | Its documentation does not say, so neither do we. |
| Notion | Its documentation does not say, so neither do we. |
| Discord | Its documentation does not say, so neither do we. |
| Slack | Its documentation does not say, so neither do we. |
For the .md file that arrives in Mail
A markdown file on a phone is the worst case: no editor, no preview, and a share sheet full of apps that want to import it into a library. The iPhone and iPad app opens it where it landed, renders it, and lets you edit and save it back.
For iPhone and iPad.