How to Share an HTML File as a Link
To share an HTML file as a link, publish it on a host that serves web pages, then send the address. The quickest way is to paste it into a pad such as HTMLpad and save: you get a link in seconds, with no account. Emailing the file or using a cloud drive usually shows code, not the page.
When you send someone an HTML file as an attachment, a few things can happen, and most of them are bad. Their email client may block it as a security risk. Their phone may show the raw code. Their laptop may open it fine, but without the images, because those lived on your disk. A link avoids all of that: the page is on a server, and everyone sees the same thing.
Why attachments and cloud drives fail
An HTML file is a set of instructions for a browser. To see the page, the browser has to load the file as a page, along with anything it refers to.
Email attachments often get flagged, because HTML attachments are a classic way to deliver phishing, as TechRadar has reported. Many mail services warn the recipient or strip the file.
Cloud drives such as Google Drive or Dropbox store and share files. When someone opens your HTML there, they usually get a preview of the code or a download prompt, not a working page. Google ended web hosting from Drive years ago.
Messaging apps behave the same way. On a phone in particular, opening an HTML file is awkward, as I explain in how to open an HTML file on iPhone.
Step by step with HTMLpad
- Open HTMLpad.org. The editor is on the home page.
- Paste your HTML into the left pane, or drag the file onto it. The right pane shows the page live.
- Check it. If something looks broken, fix it now. The usual suspects are below.
- Choose an address if you want one, for example
team-proposal. Otherwise HTMLpad picks a short random one. - Save. You get the link, ready to copy.
- Optional: leave your email to receive the edit link, so you can change the page from any device, and a reminder before the pad expires. Free pads last 90 days.
That is it. The link opens as a normal web page on any device.
Fix styles and images before you share
Most pages that look wrong online are missing something they loaded from your computer.
Styles. If your HTML has a line like <link rel="stylesheet" href="style.css">, the styles live in a separate file. Open that file, copy its contents, and paste them inside <style> and </style> in the HTML's <head>. Then delete the link line.
Scripts. Same idea. A <script src="app.js"></script> needs its file. Paste the contents between <script> and </script> instead.
Images. An image path like images/photo.jpg or C:\Users\you\photo.jpg points at your disk. Upload the image somewhere public and use its full address, starting with https://. Small images, such as icons, can also be embedded directly in the HTML as data URLs, but they count towards the 512 KB pad limit.
Fonts and libraries loaded from public CDNs, such as Google Fonts, work as they are.
When a link is not enough
A pad is the right tool for a page you want people to see. It is not the right tool if you need:
- Your own domain. Use a host that supports custom domains, such as GitHub Pages or Cloudflare Pages.
- Several connected pages. That is a website; see what a static website is.
- A form that collects data. A static page needs an external form service or a backend.
For a full walkthrough of every hosting route, read how to host an HTML file.
Frequently asked questions
Can I share an HTML file on Google Drive?
You can share the file, but people will see the code or a download prompt, not the working page. Google Drive no longer serves HTML as web pages. Publish it on a web host and share that link instead.
How do I share an HTML file without hosting?
Strictly, you cannot share a working page without some server hosting it. A pad like HTMLpad is the lightest form of hosting: no account, no setup, and the link works right away.
Will the person need an account to open my link?
No. Anyone with an HTMLpad link can open the page in any browser. Pads are not listed anywhere or indexed by search engines, so only people with the link find them.
Can I edit the page after I share the link?
Yes. Open the pad's edit view from the same device, or from the edit link we email you if you left your address, change the HTML and save. The link stays the same.
