Guide

How to share an HTML file

Sent as an attachment, an HTML file usually fails. Gmail strips scripts, Slack shows the source, Google Drive previews raw markup, and phones open it in a text viewer. To share it, put it on a web server and send the URL.

Four ways, fastest first:

  1. sharehtml.org: upload, get a link, about 10 seconds. No account. Free pages are kept forever.
  2. Netlify Drop: drag a folder. You need an account within one hour to keep it.
  3. GitHub Pages: permanent, but it needs a public repo and 5-10 minutes.
  4. Send the file anyway, when the recipient is a developer and will open it locally.

The table below compares limits, expiry, privacy and whether the host modifies your file.

Why the file does not "just work"

An HTML file is instructions for a browser. Nothing runs until a browser opens it from a web address or from disk. Most places you would send a file do neither.

A link fixes all four, because a link is a server, and a server serves the page.

The fast path: upload it, send the link

Go to sharehtml.org, drop the file or paste the code, and copy the link. It looks like https://name.sharehtml.org. Send that.

The durable path: GitHub Pages, Cloudflare Pages

For a site you will keep building, use a git-backed host. GitHub Pages allows sites up to 1 GB with a soft 100 GB per month bandwidth limit. It needs a GitHub account and a repository, and the repository is public unless you pay $4 per user per month.

Cloudflare Pages direct upload takes 1,000 files at 25 MiB each with unlimited bandwidth on the free plan. It needs an account. Both are the right answer for a project, and the wrong answer for one file you want to send today.

When it is more than one file

sharehtml.org hosts one HTML file per link. If your page has separate CSS, JavaScript or image files, do one of these:

Sharing privately

A free sharehtml.org link is unlisted. The address is a random 7-character name that nobody can guess, and search engines receive a noindex header. Anyone who has the link can open it.

Pro ($5 a month or $40 a year) adds private pages: a password, or owner-only viewing. It also lets you pick the name and publish the page to search when you want it found.

Comparison table

Checked 2026-09-03. The full 28-row version is on alternatives.

HostAccountFree sizeFree link lifetimeChanges your fileTime to a link
sharehtml.orgno5 MB, about 25 pagesforeverno, byte-for-byte10 seconds
Netlify Dropwithin 1 hourabout 50 MB recommended1 hour unclaimed, password-protected until claimedno1 minute plus sign-up
Cloudflare Dropwithin 60 minutes25 MiB per file, 1,000 files1 hour unclaimedno, but needs index.html at the root1 minute plus sign-up
tiiny.hostyes3 MB, 1 site7 daysadds a banner2 minutes
GitHub Pagesyes, plus a repo1 GB sitepermanentno5-10 minutes
Email attachmentnoabout 25 MBn/ascripts strippedoften fails to open

Questions people ask

How do I share an HTML file as a link?

Upload it to a host that serves HTML and send the URL. On sharehtml.org that is one drop.

Why does my HTML file show as code in Slack, email, Drive or WhatsApp?

Those apps store files; they do not serve pages. They show the text of the file, which is the code. A link to a server shows the page.

Where can I host an HTML file for free, and does the link expire?

sharehtml.org free links do not expire. Netlify Drop and Cloudflare Drop expire after 1 hour unless claimed. tiiny.host free links expire after 7 days.

How do I open an HTML file someone sent me on iPhone or Android?

Tap it and pick a browser. If you see code, upload it to sharehtml.org and open the link. Details are in the phone guide.

How do I share a Claude artifact, ChatGPT HTML or Gemini Canvas with someone who has no account?

Download or copy the HTML, upload it, send the link. Guides: Claude, ChatGPT, Gemini.

Can people comment on it like a Google Doc?

Not on sharehtml.org. sharehtml.com (a different product by Simular AI) and HummingDeck sell that. We serve the file as-is, which rules out injecting a comment layer.

GitHub Pages vs Netlify Drop vs a drag-and-drop host: which one?

One file you want to send today: a drag-and-drop host. A site you will keep building: GitHub Pages or Cloudflare Pages. Netlify Drop sits between: fast, but it needs an account within an hour.

Can I turn the HTML into a PDF instead?

Yes, with the browser's print dialog. You lose interactivity, links inside the page and responsive layout. A link keeps all three.

Can I host a single HTML file for free? Is there a size limit?

Yes. 5 MB per file on sharehtml.org free, 25 MB on Pro.

What if it is not one file (images, CSS, React or JSX from Claude)?

Ask the tool to inline everything into a single HTML file. For a React artifact from Claude, ask Claude for one self-contained HTML file.

Is it safe to open an HTML file someone sent me?

Opening a file from disk gives it access to nothing but itself. Opening a link on a host that shares one origin between users is riskier, because pages can read each other's storage. sharehtml.org gives every page its own origin.

Can I password-protect or make the link private?

On sharehtml.org Pro, yes. Free links are unlisted and unguessable but open to anyone with the URL.

Will Google index my page? Can I stop it, or make it indexable?

Free pages carry a noindex header, so no. Pro pages can be published to search, which removes the header and adds the page to our sitemap.

Does the host change my file (inject a badge, analytics, ads)?

Several do: tiiny.host free adds a banner, Stacktree adds a footer, Lovable and Bolt add branding. sharehtml.org serves the bytes you uploaded and nothing else.