How to send an HTML file in Slack so people actually see the page

Upload an .html file to Slack and the channel gets a file card, not the page. Send the page as a link instead and Slack draws a preview card with the title and image, and it opens in one click.

To send an HTML file in Slack and have people see the page, send it as an address, not as a file. Drag the .html file into a channel and Slack shows a grey file card with a download icon.

An .html file uploaded to Slack becomes a grey file card with a download icon. Nobody clicks it.
An .html file uploaded to Slack becomes a grey file card with a download icon. Nobody clicks it.

Nobody clicks it, and the ones who do get a file in their Downloads folder. Paste a link to the same page and Slack draws a preview card with the title and image, and the page opens in one click, on a phone too.

This guide covers what Slack does with each thing you might send, the one exception, and how to get the card right.

What Slack does with an uploaded .html file

Slack previews what it can draw without risk. An image is pixels. A PDF is a fixed document. A code file is text. HTML is different: it can load remote content, run scripts and draw a form that looks like a login page.

A chat client that rendered every uploaded HTML file inline would be handing every uploader a way to run code inside everyone else's client. So Slack does the safe thing for most workspaces: a file card, a download button, and it stays out of it.

That is not a size problem. Slack accepts files up to 1 GB. The upload works; the card is the result.

The exception. From mid-2026, some Slack workspaces started showing an inline preview for a complete, self-contained .html file attached to a message.

It is a gradual rollout with no setting to turn on, so the same file can render for one team and show a card for another.

Where it does render, it is still a preview inside Slack: HTML pasted into the message body stays text, a page that depends on a stylesheet or images in other files shows without them, and the page cannot be opened outside the workspace or found later by anyone who was not in the channel. Do not plan on it.

What each thing you could send actually produces

What you send What the channel shows What the reader has to do
The .html file A file card, or in some workspaces a preview Download it, find it, open it with a browser
A code snippet Coloured source code Read markup instead of the page
A screenshot The picture Nothing, but the page is now frozen and uncopyable
A PDF export An inline preview Nothing, but interactive parts are gone
A link to the page A preview card with title, description and image Click once

Only the last row gets anyone to the actual page in one action. The screenshot and PDF rows are fine when the content is final and static. They stop being fine the moment a number in it can change, because the copy in the channel is now permanently wrong and looks authoritative.

What the download path costs the reader

For the people who do click the file card: the file lands in Downloads, they have to find it, and then it has to open.

On a desktop that depends on whether .html is associated with a browser or a code editor. On a phone it usually stops at the file manager.

If the page reached for a stylesheet or images next to it, those did not come along, so it renders as bare text. Several places to fall off, and a file card gives nobody a reason to start.

  1. Give the page an address. Paste the HTML into a NOS document and copy the share link from Share › Share link. Turning HTML into a link is one paste.
  2. Check the page has a title, description and image. Slack builds the preview card from these tags in the page's head:
The same page sent as a link. Slack unfurls a card with the title and image, and it opens in one click.
The same page sent as a link. Slack unfurls a card with the title and image, and it opens in one click.
<title>Weekly overview — week of 7 Sep</title>
<meta property="og:title" content="Weekly overview — week of 7 Sep">
<meta property="og:description" content="Signups, active teams, and where support time went.">
<meta property="og:image" content="https://example.com/preview.png">

See Open Graph tags for what each line does. A page without them unfurls as a bare address, which looks like spam and gets ignored almost as thoroughly as a file card.

  1. Paste the link with one line of context. "Weekly numbers, signups up 12%." Slack unfurls the card under the message. If you paste several links, only the first unfurls by default; put the one that matters first.
  2. Revise the page, not the message. When someone spots an error, fix the page. The link in the channel already points at the corrected version. There is no "ignore that file, here is v2" message, which is the message everybody has had to send at some point.
Sending the file itself ✗ Often filtered by mail security rules ✗ May open as plain text on a phone ✗ Every fix means a new attachment ✗ No way to know who opened it ✗ Recipient needs the right app Sending a link ✓ Passes through mail and chat ✓ Renders in the phone browser ✓ Fix once, link stays the same ✓ The address is the single source ✓ Any browser is enough
A file card versus a link that the app can fetch and preview.

If you only need to show the code

Sometimes the markup is the point: a colleague asks how a chart was built, or you want a review of the structure. Then a snippet is right. Type a message, click the plus, choose Create a text snippet, set the type to HTML and paste.

Slack highlights it and folds it after a few lines, and readers can expand or download it. Just know that nobody will see the page this way, and a 40 KB dashboard makes a very long snippet.

Controlling the preview

Slack lets you remove an unfurl after posting by clicking the small x on the card, and workspace admins can turn link previews off for everyone.

Create the link on the Share tab. The card is built from the page title and description.
Create the link on the Share tab. The card is built from the page title and description.

If your link shows no card at all, check three things in order: the page is reachable without login, it has a <title>, and the og:image address is a full https:// address to a real image file. The preview card guide has the checklist.

To check the markup renders before sending it, use the HTML viewer.

Why this matters more than it sounds

In a channel, the cost of a bad share is not the download. It is that the conversation moves on. A file card generates no discussion because nobody has seen the contents. A preview card puts the title and the headline number in front of everyone scrolling past, and the ones who care click through.

When a number changes, fix the page. The link already in the channel points at the fix.
When a number changes, fix the page. The link already in the channel points at the fix.

In NOS the pasted HTML becomes a page at a fixed address. The wording stays editable by clicking, so a correction is a click rather than a re-export, and the card in the channel keeps pointing at the current version however many times you revise it.

The same problem in other tools

Tool Uploaded .html Link
Slack File card, or inline preview in some workspaces Preview card
Teams Stored in the channel's file library; viewer offers a download Preview card, or a pinned website tab
Discord Source code preview with a download Preview card
Email Warning banner, no preview, sometimes stripped Plain link

Every row is the same trade. Chat and mail clients draw what they can trust and hand out the rest as files. An address is the one thing all of them treat the same way.

Questions people ask

Why does Slack show my HTML file as a file card instead of the page?

Slack previews formats it can draw safely: images, PDFs, office files, code. HTML is a program that can run scripts and load remote content, so for most workspaces Slack shows a card and offers a download. Some workspaces began seeing an inline preview of complete .html files in mid-2026, but it is a gradual rollout and not something you can turn on.

Can I paste the HTML as a code snippet instead?

You can, and Slack will syntax-highlight it. The reader sees markup, not the page. A snippet is right when the code itself is the thing being discussed, and wrong when the point is what the code draws.

Why does a link get a preview card when the file does not?

Slack fetches the address, reads the page title, description and image from its Open Graph tags, and draws a card. A file has no address to fetch and no tags to read.

What is the size limit for files in Slack?

Slack accepts uploads up to 1 GB, so size is not why an HTML file fails. The file goes up fine; the problem is that a file card is what comes out the other end.

Does this apply to Teams and Discord too?

Yes. Every chat client makes the same trade: preview safe formats, hand out the rest as files. The address route works in all of them because a link is plain text and every client can fetch it.

Keep reading