All posts

How to Share an HTML File as a Link (Without Hosting It Yourself)

Most people share an HTML file as an attachment, and it rarely opens the way they made it. Here is how to share an HTML file as a link instead, and when to use real hosting.

June 30, 2026 · 3 min read

When people want to share an HTML file as a link, most of them give up and attach the file instead. That almost never opens the way they made it. Email won't render it, most chat apps strip it or show the raw code, and a screenshot loses everything you can click.

I built ShareMyPage for exactly this, so the tool I recommend below is mine. I'll also say when it's the wrong choice.

Usually the file came out of Claude, ChatGPT or your editor. An .html file is self-contained, but it only comes alive in a browser. What you want is a URL you can paste into Slack, a doc or a text, that opens the live page on any device.

A link works on phones, previews properly when you post it, and stays in one place, so everyone sees the latest version. A file gets copied, renamed and lost. (Weighing your options? See link vs. file vs. screenshot.)

This is for you if:

  • you have one HTML page, from an AI tool or a code editor
  • you don't want to set up hosting for it
  • you want to decide who can open it
  1. Save the page as an .html file, if it isn't one already.
  2. Open ShareMyPage and drop the file in, or click to choose it. If it uses local images, drop them in with it, or drop the whole folder, and the references are rewritten for you.
  3. Choose who can see it in the Share dialog.
  4. Copy the link and send it.

The page is live the moment it lands. It renders in a sandboxed frame, so it is safe to open, and you can replace the content later without changing the link.

A page shared on ShareMyPageOpen full page ↗

Two real downsides. The sandbox that keeps the page safe also means it gets no localStorage and no cookies, so a page that saves things in the browser forgets them on reload. And the free plan caps a page at 2 MB (10 MB on paid plans), which a file with large embedded images can pass.

Most pages should not be public

The same upload works whether the page is for the world or for one client. You pick one of these:

  • anyone with the link, no sign-in needed
  • anyone with the link plus a password you set
  • everyone in your workspace
  • just you

On top of any of them, you can invite specific people by email.

Use real hosting for a real site

ShareMyPage hosts one document per link. If you are building a whole site, with pages that link to each other and a build step, a proper static host is the better tool. For one page you want someone to see today, it's more setup than the job needs.

The short version

  • Send a link, not the file.
  • Use ShareMyPage if it's one page and you want to control who sees it.
  • Use a static host if it's a whole site.
  • Send the file itself only when someone asks for the file.

One tip: start with the narrowest access that works. You can open the page up later, and the link you already sent stays the same.

Got an HTML file to share? Create your first page and drop it in.

Publish your own page in about a minute.
Drop in HTML or Markdown from any AI, decide who can open it, and share one link. Free plan, no credit card.