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
.htmlattachments 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.cssor 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)
- Open the HTML file to URL converter and drop your file (or the folder / ZIP if it uses other files).
- Optionally type an address like
project-briefand a password. - 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.
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
| Situation | Best option |
|---|---|
| Quick feedback from a colleague or client | Converter, with a password |
| Homework or a class project | Converter (link + QR code for the teacher) |
| AI-generated app you want friends to try | Converter |
| Portfolio that should stay up for years | Paid converter plan, GitHub Pages or Cloudflare Pages |
| Static image of a layout |
Before you send the link
- 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.