Back to Blog
Guide

Slack Markdown File Preview: How to Read .md Files in Slack

Slack shows an uploaded .md file as raw text, with the # and ** characters visible. To read it formatted, paste the rendered text into a canvas, create the canvas from markdown with the API, or send it in a markdown block. HTML files and Mermaid diagrams do not render either; the workarounds are below.

Slack Green Team
September 28, 2026
October 12, 2026
4 min read
Share:
slack
markdown
canvas
developers

Slack does not render markdown files. When you upload a .md file, Slack shows it as a text file, with the #, ** and - characters visible, the same as a .txt. To read a markdown file formatted inside Slack, put it in a canvas: copy the rendered text from a preview (GitHub or VS Code) and paste it into a canvas, or have an app create the canvas from the markdown with Slack's canvases.create API. Going the other way, a canvas has no Markdown or PDF export button; export a Slack canvas covers both. For a bot message, the Block Kit markdown block formats standard markdown up to 12,000 characters.

HTML files and Mermaid diagrams do not render in Slack either. For those, share a link or an image.

For a markdown snippet going into a normal message, our free Markdown to Slack converter rewrites it in Slack's own syntax.

Slack markdown file preview: uploads show raw text; canvas and the markdown block render it

Where markdown renders in Slack

Where markdown renders in Slack: uploaded file, snippet, composer, canvas, markdown block, HTML, Mermaid
WhereRenders markdown?Notes
Uploaded .md fileNo, raw textGood for downloading, not reading
Text snippetNo, syntax colors onlyFor code, config and logs
Message composerPartlyPaste, then Cmd+Shift+F (Ctrl+Shift+F) to apply markdown formatting; no tables or headings
CanvasYesHeadings, lists, tables up to 300 cells, checklists
Markdown block, from an appYes12,000 characters per message
HTML fileNo, shows the sourceHost it and share a link
Mermaid diagramNoExport a PNG or SVG

Snippets are Slack's way to share code, config files and logs. Slack's help says you choose a file type for syntax highlighting, so a snippet set to Markdown gets colors, not formatting.

Read a .md file formatted in a canvas

Read a markdown file formatted in Slack: open a rendered preview, copy, paste into a canvas, share

  • Open a rendered preview of the file. GitHub shows .md files formatted. In VS Code, press Cmd+Shift+V (Ctrl+Shift+V on Windows) for the Markdown preview.
  • Select the rendered text and copy it. You copy formatted text, not the raw symbols.
  • Create a canvas: open Canvases in the sidebar, or the canvas icon at the top of a channel, and paste.
  • Share the canvas in the channel or DM.
  • The same copy-the-rendered-text trick works in the message box for short notes, because Slack keeps bold, links and lists from formatted text you paste. Tables and headings do not exist in messages, so long documents belong in a canvas.

    Create a canvas from a markdown file with the API

    Turn a .md file into something people can read: canvas, share it, or a markdown block for bot messages

    Slack's canvas API takes markdown directly. canvases.create accepts a document_content object with "type": "markdown", up to 1 MiB of text. The supported elements include headings h1 to h3, bold, italic, strikethrough, bulleted and ordered lists, checklists, code blocks, quotes, dividers, links, tables and @mentions.

    # pip install slack_sdk ; needs a bot token with the canvases:write scope
    from pathlib import Path
    from slack_sdk import WebClient
    
    client = WebClient(token="xoxb-your-bot-token")
    text = Path("README.md").read_text()
    
    resp = client.canvases_create(
        title="README",
        document_content={"type": "markdown", "markdown": text},
    )
    print(resp["canvas_id"])

    Canvas tables are limited to 300 cells. Block Kit does not work inside canvases, and mentions use a different syntax there; our canvas API test shows the form that works. To attach the canvas to a channel instead of creating a standalone one, use conversations.canvases.create with the channel ID.

Never appear "away" on Slack again

Cloud-based. No downloads. Works 24/7 even when your laptop is off.

Send markdown as a bot message

For shorter text, such as a changelog or an AI answer, send it in a markdown block and Slack formats it:

{
  "channel": "C0123456789",
  "blocks": [
    { "type": "markdown", "text": "## Release 3.4\n- Faster search\n- **Fixed:** login loop" }
  ]
}

The limit is 12,000 characters for all markdown blocks in one message. The syntax differences between this block and Slack's older mrkdwn are in Slack Block Kit markdown.

Can Slack render HTML or Mermaid?

No. An uploaded .html file shows its source code, and Slack does not run or display the page. A mermaid code block shows as text. The options:

  • • HTML: publish the page somewhere (an internal site, GitHub Pages) and share the link. Slack shows a link preview.
  • • Mermaid: export the diagram as PNG or SVG from the Mermaid Live Editor or your docs tool, and upload the image. A PNG shows inline in the conversation.
  • • Both: a screenshot is the fastest way to show what a page or diagram looks like.
  • Paste markdown into a normal message

    For a few lines of markdown, paste into the message box and press Cmd+Shift+F (Ctrl+Shift+F), Apply markdown formatting. Slack converts bold, links and lists. In the composer's markup mode you can also type [text](link); app and bot messages still need <url|text>. The full walkthrough, with what survives and what does not, is in how to paste ChatGPT into Slack, and the reasons markdown sometimes shows raw are in Slack markdown not working.

    FAQ

    Can Slack preview markdown files? It previews them as plain text. The markdown is not formatted.

    How do I view a markdown file formatted in Slack? Copy the rendered text from a preview into a canvas, or create the canvas from the file with canvases.create.

    Can Slack render HTML? No. Share a link to the hosted page, or a screenshot.

    Can Slack render Mermaid diagrams? No. Export the diagram as an image and upload it.

    Does a Slack canvas support markdown? Yes. Canvases support headings, lists, tables, checklists and code, and the canvas API takes markdown directly.

    Always Active

    Stop Jiggling Your Mouse.

    Join hundreds of remote workers who never worry about their Slack status. Set it up once, stay green forever.

    Related Articles

    Guide

    How to See All Your DMs in Slack, Including the Hidden Ones

    The DMs tab lists your direct messages with people. App DMs, Slackbot and DMs with deleted accounts sit elsewhere. We compared the tab with the full list the Slack API returned.

    Slack Green Team
    Guide

    Slack Images Not Showing? 5 Causes We Reproduced

    We uploaded images to a Slack test channel and then switched each image setting off, ran /collapse, and posted from a bot that was not in the channel. Five causes, each reproduced.

    Slack Green Team
    Guide

    How to Message Yourself on Slack (and What It Notifies)

    Your own name under Direct messages opens a private DM with yourself. We sent it a note, a file, a scheduled message and a reminder, and checked which ones raised a badge.

    Slack Green Team