Slack Markdown and text formatting
Slack does not use Markdown. It uses mrkdwn, a smaller
syntax that looks similar and disagrees in the places that matter most:
*one asterisk* is bold, links use angle brackets, and there
are no headings at all.
This preview is standard Markdown: read it as the contrast, not the target
Visual
The differences, in one table
| Format | Slack mrkdwn | Standard Markdown |
|---|---|---|
| Bold | *bold* | **bold** |
| Italic | _italic_ | *italic* or _italic_ |
| Strikethrough | ~struck~ | ~~struck~~ |
| Link | <https://url|text> | [text](https://url) |
| Inline code | `code` | `code` |
| Code block | ```code``` | ```lang … ``` |
| Blockquote | > quote | > quote |
| Heading | none | # Heading |
| Table | none | pipes and dashes |
One asterisk, and why it bites
A single asterisk means italic in Markdown and bold in Slack. That is worse
than an unsupported feature, because nothing visibly fails: paste a
Markdown paragraph into Slack and *emphasis* arrives shouting.
Text going the other way looks over-formatted in the same way.
Code blocks
Backticks work the same as in Markdown: one pair for inline code, three for a block:
```
one block of code
```
Two differences. Slack ignores the language hint, so
```js puts the letters js into the block rather
than turning on highlighting: there is no syntax highlighting in a Slack
message at all. And a block does not need to be on its own lines: three
backticks anywhere in a message open one.
Everything inside is literal, which makes a code block the way to post text that must not format, including a Markdown snippet you want a colleague to read as source.
Tables in Slack
There is no table syntax in mrkdwn. Pipes and dashes render exactly as typed, so a Markdown table pasted into a message arrives as a wall of punctuation.
Four things people do instead, roughly in order of how well they work:
- A code block. Monospace keeps hand-aligned columns lined up, and it is the only method that survives being copied out again. Use the table generator to line the columns up, then paste the result inside triple backticks.
- A Canvas. Slack's document surface has real tables, with headers and sortable columns. This is the right answer for anything that will be read more than once.
- An attached file. A
.mdor CSV file renders with a preview and stays readable outside Slack. - An image. Fast, and unreadable to anyone using a screen reader or searching for a value in it. Last resort.
The composer formats for you
By default Slack's message box is WYSIWYG: it applies formatting from the toolbar and its keyboard shortcuts rather than from characters you type, which is why typed mrkdwn often appears to do nothing. To type the syntax directly, turn on Format messages with markup in Preferences → Advanced.
Lists are part of that composer rather than part of mrkdwn: the bullet and number buttons, or Ctrl+Shift+8 and Ctrl+Shift+7. A typed hyphen stays a hyphen.
Getting a Markdown document into Slack
For anything longer than a paragraph, do not translate the syntax by hand.
Open the document in the editor and use
Export → Copy as rich text, then paste into Slack: the composer
accepts formatted text and turns headings, lists and emphasis into its own
formatting. Long documents are usually better as a Canvas or an attached
.md file than as a message.
Where standard Markdown does apply
Slack's own developer surface uses the same mrkdwn in Block Kit's
mrkdwn text objects, so bots and apps follow these rules too, not the Markdown rules. Canvases are the exception: they are a document
editor with real headings and tables, closer to a wiki page than to a
message.
Common questions
- How do I make text bold in Slack?
- One asterisk on each side: *bold*. That is the biggest departure from standard Markdown, where a single asterisk means italic, so text copied from anywhere else formats wrongly rather than not at all.
- Why is it called mrkdwn rather than Markdown?
- Because Slack does not claim it is Markdown. It is a deliberately smaller, Slack-specific syntax that borrows the look; the name without vowels is how Slack's own API refers to it, and the distinction is the useful part.
- How do I add a link with custom text?
- Use angle brackets and a pipe: <https://example.com|the text>. The standard [text](url) form does nothing. In the normal composer you can also paste over selected text and Slack builds the link for you.
- Can I use headings in Slack?
- Not in a message. There is no heading syntax and hashes render literally. Bold on its own line is the conventional substitute; Canvases, which are a different editor, do have real headings.
- Why does my typed formatting not do anything?
- The composer is WYSIWYG by default, so it applies formatting from the toolbar rather than from characters you type. Turning on "Format messages with markup" in Preferences → Advanced switches it to interpreting mrkdwn as you type.
- How do I make a list?
- With the composer's bullet and number buttons, or Ctrl+Shift+8 and Ctrl+Shift+7. Typing a hyphen does not create a list: lists are a composer feature rather than part of mrkdwn.
Sources
- Slack Help: format your messagesmrkdwn, as Slack documents it