Skip to content
Share & open HTML

How to share an HTML file as a link

Sent someone an .html file and they saw code, a download prompt or nothing at all? Here is why that happens and how to send it as a link that simply opens.

7 min readUpdated October 2026By the HTMLtoURL.dev team
Short answer

To share an HTML file as a link, host it first: upload it to an HTML to URL converter (for example HTMLtoURL.dev), copy the URL it gives you and send that. The other person taps the link and the page opens in their browser. Sending the .html file itself — by email, WhatsApp, Slack or a Drive link — usually shows the code or a download prompt instead.

Why sending the file does not work

An HTML file is only a page when a browser opens it as a page. Almost every way of sending a file deliberately stops that from happening:

  • Email. Gmail and Outlook offer the attachment as a download; on phones it often opens in a text viewer. Many company filters block .html attachments outright because they are a favourite phishing format.
  • Chat apps. WhatsApp, Slack, Teams and Discord treat it as a document. Some show the source as a preview; none render it.
  • Cloud drives. Google Drive, OneDrive and Dropbox stopped rendering HTML years ago for security reasons. A shared link shows the code or downloads the file.
  • Separate files. Even if the recipient does open it, any style.css or images that sat next to the file on your computer are missing on theirs.

A link to a hosted page avoids all four: the browser fetches it from a web server with the right content type, and every file the page needs is on that server.

Option 1 — An HTML to URL converter (about 10 seconds)

  1. Open the HTML file to URL converter and drop your file (or the folder / ZIP if it uses other files).
  2. Optionally type an address like project-brief and a password.
  3. Press Get my URL, sign in with Google, and copy the link.

This is the fastest route and works from a phone. Free links last 24 hours, which is ideal for "have a look at this"; paid plans keep them permanently. You can update the page later without the link changing.

Convert your HTML to a URL now
Paste code or drop a file, ZIP or folder. Free plan, custom address, password & editing included.
Get a URL

Option 2 — GitHub Pages (permanent, free, more setup)

Create a public repository, upload the file as index.html, then enable Settings → Pages. After a minute the page is at https://username.github.io/repo/. It is free and permanent but public, requires a GitHub account and takes a few minutes per change. Details in hosting HTML with and without GitHub.

Option 3 — Netlify Drop or Cloudflare Pages

Both let you drag a folder into the browser and get a URL. They are excellent for long-lived sites with your own domain; both now want an account (Netlify deletes anonymous drops unless you claim them quickly). Overkill for a single file you want feedback on today, ideal for a portfolio that should stay up for years.

Option 4 — Send it as a PDF or screenshot instead

If the recipient only needs to see it — not click, scroll a long table or use JavaScript — print the page to PDF from your browser (Ctrl/⌘ + P → Save as PDF). You lose interactivity, but PDFs open everywhere. For interactive pages (quizzes, dashboards, games) a link is the only option.

Which option for which situation

SituationBest option
Quick feedback from a colleague or clientConverter, with a password
Homework or a class projectConverter (link + QR code for the teacher)
AI-generated app you want friends to tryConverter
Portfolio that should stay up for yearsPaid converter plan, GitHub Pages or Cloudflare Pages
Static image of a layoutPDF
  • Open it yourself on a phone — most people will.
  • Check the page has a <title>: it becomes the preview text in chat apps.
  • Remove anything private you do not mean to share (API keys in scripts, personal data in tables). Anyone with a link can view source.

Questions people ask

How do I send an HTML file so it opens in a browser?

Upload it to an HTML host and send the URL. The recipient's browser then renders it as a page instead of treating it as a download.

Can I share an HTML file through Google Drive?

Not as a web page. Drive shows HTML files as code or downloads them. Use an HTML to URL converter or a static host.

How do I share an HTML file on WhatsApp?

Publish it as a URL and paste the link into the chat. WhatsApp turns it into a tappable link that opens the page.

Is the shared link private?

It is unlisted and noindex, but anyone who has it can open it. Add a password for anything sensitive.

Read next

Paste HTML. Get a URL.

Code, an .html file, a ZIP or a whole folder becomes a live HTTPS URL with your own address, an optional password and a QR code. Free to start with Google sign-in; paid plans keep URLs online for good.

Convert HTML to URL