Monospace in Confluence: How to Format Inline Code (Shortcuts & Markdown)
Select the text and press Ctrl+Shift+M (Windows) or Opt+Shift+M (Mac) to apply inline code, or type `backticks` around text as you write — the Confluence Cloud editor autoformats them. Pasted Markdown keeps its backticks as literal characters, so paste into Enhanced Markdown for Confluence instead, which renders inline code, code blocks, and diagrams from your Markdown source.
Inline code — monospace text on a subtle background — is how you mark up variable names, file paths, key names, and short commands inside a sentence: set MAX_RETRIES = 3, edit ~/.zshrc, or run kubectl get pods. Confluence Cloud has three ways to produce it, and each fits a different moment: formatting as you go, typing Markdown, or bringing Markdown in from your repo.
- The keyboard shortcut — Ctrl+Shift+M, and the Mac split between Opt+Shift+M and Cmd+Shift+M
- Backtick autoformatting while you type
- The Markdown method for pasted content (Enhanced Markdown)
- Inline code vs code block — which one to use where
Method 1: the keyboard shortcut (standard editor)
- Select the text you want in monospace.
- Press Ctrl+Shift+M (Windows/Linux) or Opt+Shift+M (Mac).
The selection turns into inline code immediately — press the shortcut again to toggle it off. The same style is in the toolbar: select text, open the text formatting menu, and pick Code.
One Mac quirk worth knowing: Atlassian lists two code shortcuts. Opt+Shift+M applies inline code to a selection (text formatting), while Cmd+Shift+M creates a code block (block formatting). If you wanted a highlighted snippet and got a whole code section instead — or the reverse — that's the split you hit. On Windows both are Ctrl+Shift+M.
To see the full shortcut list on your site, press Ctrl+/ (Cmd+/ on Mac) while editing.
Method 2: backtick autoformatting while you type
The Confluence Cloud editor parses a set of Markdown shortcuts as you type, and inline code is one of them: type a backtick, the text, and a closing backtick, and it converts to inline code on the closing tick — the same mechanic as **bold**, *italic*, and ~~strikethrough~~.
Type this: `MAX_RETRIES`
Get this: MAX_RETRIES in inline code style
This is the fastest method if your hands are already on the keyboard — no selection, no menu.
The catch: autoformatting only runs while typing. It is not a paste converter.
Method 3: pasted Markdown (Enhanced Markdown)
If your content starts life as Markdown — a README, a runbook, an architecture doc with inline code, fenced code blocks, and diagrams — pasting it into the standard editor lands every backtick as a literal character. Retyping them works for one sentence, not for a 200-line document.
Enhanced Markdown for Confluence takes the paste directly: inline code, fenced code blocks with syntax highlighting, tables, math, and Mermaid diagrams all render from the pasted source, and the Markdown stays re-editable on the page — fix a variable name by editing the line, not by re-importing. The full syntax coverage is in the user guide.
Inline code vs code block — which one where
| Inline code | Code block | |
|---|---|---|
| Shortcut | Ctrl+Shift+M / Opt+Shift+M | Cmd+Shift+M (Mac) / Ctrl+Shift+M (Win) |
| Markdown | `one tick` | ``` fences |
| Use for | variables, paths, keys, one-line commands | multiline snippets, config files, scripts |
| Syntax highlighting | no | yes (190+ languages in Markdown apps) |
| Line breaks | no — collapses with the sentence | preserved |
Rule of thumb: if it fits inside a sentence, inline code. If it needs its own lines, a code block.
Styling limits (and what apps add)
Native inline code has exactly one style: monospace font, light background, no options. There is no theme, no per-space color, no size control — and no way to add a second emphasis level next to bold and italic.
If pages need styled code at the block level — themes, custom colors, highlighted lines — Modern Code Blocks handles that; inline code stays native either way. For teams living in Markdown, Enhanced Markdown covers the paste path described above. And if what you actually want is a colored label rather than code — a chip that says In review or Deprecated — Confluence's native status element (type /status) is the closer tool.
Related guides
- How to make text bold in Confluence — the sibling text-formatting shortcut and
**bold**syntax - Markdown code blocks in Confluence — fenced blocks, highlighting, and themes
- How to write Markdown in Confluence — the full syntax the editor supports
- Paste Mermaid diagrams into Confluence — the repo-Markdown paste workflow, end to end