How to use the markdown to slack converter
- Paste your Markdown into the input area.
- Choose whether to convert links to Slack's
<url|text>form. Leave it on for API, webhook or bot messages; turn it off if you will paste into the message box. - Copy the output and use it as the
textof a Slack API call or webhook payload, or paste it into the message box if you have markup formatting enabled.
Supported Markdown subset
This markdown to slack converter handles these CommonMark and GitHub-style elements and translates them to Slack mrkdwn:
- Headings
#to######become bold text*Heading*(mrkdwn has no heading levels). - Bold
**text**or__text__become*text*. - Italic
*text*or_text_become_text_. - Strikethrough
~~text~~becomes~text~. - Inline code
`code`stays`code`and is never touched by the other rules. - Fenced code blocks (
```or~~~) stay as triple-backtick blocks. Slack does not highlight by language, so the language name is dropped. - Links
[text](url)become<url|text>(option on) or stay as written (option off). An optional"title"after the URL is dropped. - Images
become links<url|alt>, because mrkdwn cannot inline an image. - Lists with
-,*or+become-; numbered lists keep their numbers; nesting is kept as indentation. - Blockquotes
> textstay> text. - Horizontal rules become
---(Slack has no rule element). - Tables become aligned plain text inside a code block, which is the only way to keep columns lined up in Slack.
Everything else (task lists, footnotes, definition lists, indented code blocks) is passed through as plain text.
How the conversion works
The markdown to slack conversion runs in your browser in two stages:
- Block parsing: the input is read line by line. Fenced code, headings, horizontal rules, blockquotes, tables and list items are recognised and converted to their Slack equivalent. Code block contents are copied as they are, apart from escaping.
- Inline parsing: inside each line, code spans, links, images and URLs are set aside first so their contents are not altered. Then
&,<and>are escaped, and bold, italic and strikethrough markers are rewritten. The set-aside parts are put back last.
Slack only treats &, < and > as special, and decodes only &, < and >, so those are the only characters escaped. For example, **bold _nested_** becomes *bold _nested_*, and AT&T becomes AT&T.
Table conversion example
Markdown tables become fixed-width text inside a code block, so columns stay lined up in Slack's monospace font:
| Markdown input | Slack output |
|---|---|
| Name | Age | | ``` |
The alignment markers :--, --: and :-: set left, right or center padding. Because a code block cannot show formatting, bold or links inside table cells are written as plain text, with a link shown as text (url).
Where the output works
Slack's mrkdwn is what the API, incoming webhooks and Block Kit mrkdwn text fields understand, so that is where the output is intended for. In the Slack message box the behaviour depends on your formatting settings: with markup formatting enabled, *bold*, _italic_, ~strike~, backticks and > quotes render, but the <url|text> link form does not, and neither do lists with - in every client. Check the output in a test channel before you rely on it.
Common mistakes and edge cases
- Nested emphasis: combinations such as
***bold italic***are not converted; write the bold and italic parts separately. - Indented code blocks (four spaces) are not detected; use fenced blocks instead.
- Task lists
- [ ]stay as plain text. - Autolinks
<https://example.com>are already valid Slack mrkdwn and are kept; bare URLs are left alone so underscores in them are not read as italics. - Underscores in words such as
snake_case_nameare not treated as emphasis. - Size: input is limited to 500,000 characters.
Worked examples
| Example | Input | Result |
|---|---|---|
| Mixed formatting | Markdown input: # Heading / **Bold** and _italic_ with `code`. / - Item 1 / - Item 2 / > Quote / ```js / console.log('hi') / ```; Convert links to Slack <url|text> format: yes | *Heading* / *Bold* and _italic_ with `code`. / - Item 1 / - Item 2 / > Quote / ``` / console.log('hi') / ``` |
| Links and table | Markdown input: See [Slack](https://slack.com) and . / | Name | Role | / |------|------| / | Ada | Dev | / | Lin | Lead |; Convert links to Slack <url|text> format: yes | See <https://slack.com|Slack> and <https://example.com/img.png|logo>. / ``` / Name Role / ---- ---- / Ada Dev / Lin Lead / ``` |
| HTML escaping | Markdown input: <script>alert(1)</script> / **Safe** & <b>bold</b>; Convert links to Slack <url|text> format: no | <script>alert(1)</script> / *Safe* & <b>bold</b> |
FAQ
Does this support GitHub-flavored Markdown like task lists or strikethrough?
Strikethrough ~~text~~ is converted to Slack's ~text~. Task lists stay as plain text, and footnotes are not supported. For full GFM fidelity, use a dedicated renderer.
Can I convert Slack mrkdwn back to Markdown?
This tool is one-way. For the reverse, write a small script or convert the rendered message with the HTML to Markdown tool.
Why are my headings not showing as large text in Slack?
Slack's mrkdwn does not support heading levels. The converter turns # Heading into *Heading* (bold), which is the closest equivalent.
What happens to HTML in my Markdown?
The characters <, > and & are escaped to <, > and &, so tags show as text and cannot create mentions or links.
Why does <url|text> show up literally when I paste it into Slack?
That link form is only interpreted in messages sent through the API, webhooks and Block Kit. In the message box, turn the link option off and paste the plain URL, or use the box's own link tool.
Does the tool work offline?
Yes. The page loads once, then all conversion runs in your browser with no network requests.
How are table columns aligned?
The converter measures the widest cell in each column and pads every cell to that width inside a code block. The alignment row |:--|--:|:-:| sets left, right or center padding.