Skip to content
All referenceText Formatting

Markdown Inline Code

Learn how to format inline code in markdown using backticks. Syntax, examples, platform support, and common mistakes.

What is markdown 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.

Syntax

Single backticks

Wrap any word or phrase in single backticks to render it as inline code.

Result
code

With spaces

Commands and multi-word phrases work exactly the same way.

Result
npm install

Double backticks (backtick inside)

Use double backticks when the code itself contains a backtick.

Result
`nested`

Platform support

PlatformSupportedNotes
GitHubYes
GitLabYes
DiscordYes
SlackYes
NotionYes
ObsidianYes

Common mistakes

Wrong
'code'
Right
`code`

Single quotes are not backticks. Use the backtick key (top-left of most keyboards, below Esc).

Wrong
``code``
Right
`code`

Double backticks are only needed when the code contains a backtick. For normal code, use one.

Tips for inline code

1Use for all technical terms

Wrap file names, variable names, CLI commands, and function names in backticks to visually separate them from prose.

2Different from code blocks

Inline code (`code`) is for short snippets inside text. For multi-line code, use a fenced code block (```).

Frequently asked questions

Everything you need to know.

1

How do I write a backtick inside inline code?

Use double backticks as the delimiter: `` `backtick` `` renders the word with a backtick visible inside it.

Related elements

Try it in the editor

Paste your markdown and see inline code rendered instantly with professional themes.