Xerobit

Markdown to Slack Converter: Convert Markdown to Slack mrkdwn

Paste Markdown and get Slack mrkdwn. This markdown to slack converter handles headings, bold, italic, strikethrough, code, fenced blocks, links, images, lists, blockquotes, rules and simple tables, and escapes angle brackets and ampersands as Slack expects. Best for API, webhook and Block Kit messages. It runs in your browser; nothing is uploaded.

Supported subset: headings, **bold**, _italic_, ~~strike~~, `code`, fenced code, [links](url), ![images](url), lists, > quotes, ---, | tables |. Up to 500,000 characters.

Slack mrkdwn

How to use the markdown to slack converter

  1. Paste your Markdown into the input area.
  2. 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.
  3. Copy the output and use it as the text of 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 ![alt](url) 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 > text stay > 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:

  1. 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.
  2. 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 &amp;, &lt; and &gt;, so those are the only characters escaped. For example, **bold _nested_** becomes *bold _nested_*, and AT&T becomes AT&amp;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 inputSlack output
| Name | Age |
|------|----:|
| Ada | 36 |
| Lin | 29 |
```
Name Age
---- ---
Ada 36
Lin 29
```

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_name are not treated as emphasis.
  • Size: input is limited to 500,000 characters.

Worked examples

ExampleInputResult
Mixed formattingMarkdown 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 tableMarkdown input: See [Slack](https://slack.com) and ![logo](https://example.com/img.png). / | Name | Role | / |------|------| / | Ada | Dev | / | Lin | Lead |; Convert links to Slack <url|text> format: yesSee <https://slack.com|Slack> and <https://example.com/img.png|logo>. / ``` / Name Role / ---- ---- / Ada Dev / Lin Lead / ```
HTML escapingMarkdown input: <script>alert(1)</script> / **Safe** & <b>bold</b>; Convert links to Slack <url|text> format: no&lt;script&gt;alert(1)&lt;/script&gt; / *Safe* &amp; &lt;b&gt;bold&lt;/b&gt;

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 &lt;, &gt; and &amp;, 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.