Back to blog

How to Share an HTML File Online (Without Setting Up Hosting)

Need to share an HTML file with someone? Here are 6 practical ways to host a single HTML file and get a shareable link, no server setup required.

H
Handoff
· · 8 min read

How to Share an HTML File Online (Without Setting Up Hosting)

You have an HTML file on your computer. Maybe it's a prototype you built, a report you generated, or something an AI tool spit out. You want to send someone a link so they can see it in their browser. That's it. You don't want to set up a server, configure DNS, or create a deployment pipeline.

This is a surprisingly common problem. Developers hit it when sharing quick demos. Designers hit it when sending mockups to clients. And with AI coding tools generating full HTML pages in seconds, the gap between "I have a file" and "someone else can see it" matters more than ever.

Here are six practical ways to share an HTML file online, each with different tradeoffs.

1. GitHub Pages

GitHub Pages is the go-to for developers who already live in Git. You push HTML files to a repository, enable Pages in the settings, and GitHub serves them at username.github.io/repo-name.

How it works

  1. Create a repository on GitHub (or use an existing one).
  2. Push your HTML file to the main branch (or a gh-pages branch).
  3. Go to Settings > Pages and select the branch and folder.
  4. Wait a minute or two for the build to complete.

Pros

  • Free and reliable, backed by GitHub's infrastructure.
  • Supports custom domains.
  • Great for projects that are already version-controlled.

Cons

  • Requires a GitHub account and basic Git knowledge.
  • Deployment is not instant. Build times range from 30 seconds to a few minutes.
  • Overkill if you just want to share a single file quickly.
  • Repository must be public (on the free plan) for Pages to work.

GitHub Pages is excellent for ongoing projects but heavy for one-off sharing.

2. Tiiny.host

Tiiny.host is built specifically for this use case. You drag and drop an HTML file (or a zip), and it gives you a link. No account required for the first upload.

How it works

  1. Go to tiiny.host.
  2. Drag your HTML file onto the page.
  3. Pick a subdomain name.
  4. Get your link.

Pros

  • Dead simple. No Git, no CLI, no config.
  • Works in seconds.

Cons

  • Free tier has limits on file size and the number of sites.
  • Links expire on the free plan.
  • Paid plans start at $6/month for permanent links.
  • No built-in versioning. Updating a page means re-uploading.

Tiiny.host works well for quick, disposable shares. If you need the link to last or want version history, you'll outgrow it.

3. Surge.sh

Surge is a CLI tool for publishing static sites. If you're comfortable with the terminal, it's fast and free.

How it works

npm install -g surge
surge ./my-folder my-project.surge.sh

That's it. Your files are live.

Pros

  • Fast deploys from the command line.
  • Free tier with unlimited projects.
  • Custom domain support.

Cons

  • Requires Node.js and npm installed locally.
  • Deploys a directory, not a single file (you'll need to put your HTML in a folder).
  • No versioning. Each deploy overwrites the previous one.
  • The project has had periods of slow maintenance.

Surge is a solid choice for developers who want CLI deploys without learning a platform. It's been around since 2014 and still works well for simple use cases.

4. Netlify Drop

Netlify Drop lets you drag and drop a folder onto the Netlify dashboard to deploy instantly. It's the manual-upload counterpart to Netlify's Git-based workflow.

How it works

  1. Go to app.netlify.com/drop.
  2. Drag a folder containing your HTML file.
  3. Netlify assigns a random subdomain and your site is live.

Pros

  • No account needed for the initial deploy (though you'll need one to claim the site).
  • Supports full static sites, not just single files.
  • Can connect a custom domain later.

Cons

  • Random URLs are not memorable. You'll want to claim the site and rename it.
  • Keeping the site live requires a (free) Netlify account.
  • For a single HTML file, the workflow feels heavyweight. Netlify is really designed for full web projects.

Netlify Drop is a good middle ground between "just give me a link" and "I want a proper deployment." But the full Netlify experience (build settings, environment variables, deploy previews) is more than most people need for sharing a single file.

5. Handoff

Handoff is a newer tool designed specifically for sharing HTML files, Markdown documents, and images with instant URLs. It gives you a clean shareable link with built-in version control.

How it works

Upload from the command line:

curl -X POST https://handoff.host/api/upload \
  -F "[email protected]" \
  -F "slug=my-page"

Or if you're using Claude Code, Handoff has a native integration that lets you upload directly from your AI coding workflow. Your page is live at handoff.host/@username/my-page.

Pros

  • Instant shareable URLs. No build step, no waiting.
  • Built-in versioning. Every upload creates a new version, but the URL stays the same. You can also access any previous version directly.
  • Clean viewer interface that works well on mobile.
  • Supports HTML, Markdown (rendered automatically), and images.
  • Free during beta with no signup friction.
  • CLI-first workflow fits naturally into development and AI coding sessions.

Cons

  • Newer product, still in beta.
  • Smaller community compared to established tools.
  • Not designed for full web applications or multi-page sites.

Handoff fills a gap that other tools leave open: when you need a permanent, versioned link for a single page and don't want to set up anything.

6. CodePen / JSFiddle / CodeSandbox

Online code editors like CodePen, JSFiddle, and CodeSandbox let you paste HTML (along with CSS and JavaScript) and share the result via URL.

How it works

  1. Go to codepen.io (or jsfiddle.net, codesandbox.io).
  2. Paste your HTML into the editor.
  3. Share the URL.

Pros

  • No file uploads needed. Just paste and share.
  • Viewers can see and edit the code alongside the preview.
  • Great for code snippets and small demos.

Cons

  • Not designed for full HTML documents. CodePen wraps your code in its own structure, which can break pages that rely on specific <head> elements or document-level styling.
  • The shared view is an editor, not a clean page. Your recipient sees the code editor UI, not just the rendered page.
  • File uploads and asset hosting require paid plans.
  • Not ideal for non-developers. Sharing a CodePen link with a client who just wants to see a design can be confusing.

Code editors are perfect for sharing code snippets and interactive demos. They're less suitable when you want someone to see a finished page.

Quick Comparison

Tool Setup Speed Versioning Best For
GitHub Pages Git repo Minutes Via Git Projects already on GitHub
Tiiny.host None Seconds No Quick, disposable shares
Surge.sh npm install Seconds No CLI-loving developers
Netlify Drop None Seconds Deploy history Static sites you might grow
Handoff None Seconds Built-in Single pages, versioned sharing
CodePen/JSFiddle None Seconds No Code demos and snippets

So Which Should You Use?

It depends on what you're optimizing for.

If you're already using GitHub and the file is part of a project, GitHub Pages is the natural choice. You'll get version control for free through Git.

If you just need a throwaway link for five minutes, Tiiny.host or Netlify Drop will get you there with the least friction.

If you're a developer who prefers the terminal, Surge.sh is fast and straightforward.

If you're sharing prototypes or AI-generated pages and want the link to stay stable with version history, Handoff is worth a look. Its versioning model is particularly useful when you're iterating on a design and want stakeholders to always see the latest version at the same URL.

And if you're sharing code snippets rather than finished pages, the online editors (CodePen, JSFiddle) are still hard to beat.

The good news is that this problem has more solutions now than ever. The days of needing a VPS and an Nginx config just to show someone an HTML page are behind us.

Ready to share your work?

Upload a file, get a link. Free during beta.

Start Sharing Free