Skip to content
Start here

How to host an HTML file online for free

The free ways to put an HTML file on the internet in 2026, what "free" really includes on each, and the limits that matter — file size, how long the page stays up, custom addresses and privacy.

8 min readUpdated October 2026By the HTMLtoLink team
Short answer

You can host an HTML file online for free by uploading it to a static host. With HTMLtoLink it takes one step: drop the file, press Get my link, sign in with Google, and it is live on HTTPS for 24 hours on the free plan — with a custom address and optional password — or permanently on a paid plan from $5/month. For a permanent site, GitHub Pages and Cloudflare Pages are free but need an account and a few minutes of setup.

What "hosting an HTML file" actually means

A web host is a computer that is always online and answers requests for files. When someone opens https://my-page.htmltolink.dev/, their browser asks that host for index.html, then for every image, stylesheet and script the page mentions. Static hosting — serving files exactly as they are — is cheap enough that many providers give it away. You only need anything more (a server, a database) if the page has to store data or run code on the server side.

Free HTML hosting options compared

HTMLtoLinkGitHub PagesNetlify / Cloudflare PagesTypical "HTML to URL" sites
Sign-upOne-click GoogleGitHub accountAccountOptional; limits without one
Time to first link~10 seconds2–5 minutes1–5 minutes~10 seconds
How long it stays up24 hours free · permanent from $5/moPermanentPermanentOften 1 hour – 3 days free
Custom addressFree subdomainusername.github.ioFree subdomainUsually paid
Password protectionFreeNoPaid plansUsually paid
Update at same URLFreeYes (commit)Yes (redeploy)Usually paid
Multi-file sites (ZIP/folder)Yes, 2 MB free · 75 MB paidYesYesOften single file only
Kept out of GoogleYes, noindexNo (indexed)No (indexed)Varies

The pattern: instant tools are for sharing, Git-based hosts are for publishing. If the page is for specific people — a client, a class, a team — you want instant, private and editable. If it is a public website you want found on Google, use a permanent host.

  1. Make sure the file opens correctly when you double-click it on your computer.
  2. Go to the publisher and choose Upload file, ZIP or folder.
  3. Drop the .html file. If it uses separate CSS, JS or images, drop the whole folder (or a ZIP of it) instead, so every file comes along.
  4. Pick an address, how long to keep it online, and a password if needed.
  5. Press Get my link and share the URL or QR code.

The limits worth knowing

  • Size: 2 MB per site on Free (ZIP uploads too), up to 75 MB on paid plans, 1,000 files — plenty for pages, slides, games and small sites; not for video libraries.
  • Static only: HTML, CSS, JavaScript and media are served as-is. PHP, Python or a database will not run. Call external APIs from JavaScript instead.
  • Lifetime: free links last 24 hours. For links that stay up, a paid plan from $5/month makes them permanent — or use a permanent host like GitHub Pages.
  • Acceptable use: no phishing, malware or illegal content — see the rules.

Common reasons a free-hosted page looks broken

Missing images and unstyled pages are almost always path problems: the HTML refers to a file that was not uploaded, or uses a different upper/lower case, or points at your own disk. Run the ZIP site checker before uploading and read why HTML breaks after upload if it still does.

Questions people ask

Is free HTML hosting safe?

For sharing pages, yes. On HTMLtoLink every site runs on its own subdomain over HTTPS, is noindex, and can be password protected. Do not put secrets such as API keys in client-side HTML on any host — anyone who opens the page can read its source.

Can I host PHP for free here?

No. HTMLtoLink serves static files only. PHP needs a server that executes code; look for a PHP host or rewrite the logic in JavaScript.

What happens when my free link expires?

The page and its files are deleted and the address shows an "expired" notice. Upgrade to a paid plan before then to keep it online permanently, or publish it again.

Can I use my own domain?

Not yet — pages live on your-name.htmltolink.dev. For your own domain, use a permanent host like GitHub Pages or Cloudflare Pages.

Read next

Your HTML deserves a real link

Paste code, drop a file, a ZIP or a whole folder — get a live URL with your own address, an optional password and a QR code. Free to start with Google sign-in; paid plans keep links online for good.

Turn HTML into a link