How to Open an HTML File in a Browser (Any OS)
Double-clicking an HTML file opens it locally. But local files can't be shared as links. Here's how to open them in a browser and make them shareable.
An HTML file sitting on your computer is just text. A browser is what transforms it into a rendered web page. Here's how to open HTML files in any browser — and crucially, how to make them available as shareable links that anyone can open.
Opening an HTML File Locally
Windows
Right-click the .html file → "Open with" → choose your browser (Chrome, Edge, Firefox). Or drag the file directly into an open browser window.
macOS
Double-click the file (it usually opens in your default browser automatically). Or right-click → "Open With" → select browser.
Linux
Right-click → "Open With Browser" or run from terminal: xdg-open file.html
From the Browser Directly
In any browser: press Ctrl+O (Windows/Linux) or Cmd+O (Mac) → navigate to your HTML file → click Open.
The Problem with Local Files
When you open a local HTML file, the URL in your browser looks like file:///Users/you/Documents/index.html. This URL only works on your computer. You cannot send it to anyone else — they don't have the file on their machine, and the file:// protocol doesn't work across the internet.
How to Make an HTML File Shareable
To share an HTML file so others can view it by clicking a link:
- Go to TiniDrop
- Drag your
.htmlfile onto the upload zone - Wait a few seconds for the upload to complete
- Copy the generated link (e.g.
tinidrop.com/s/abc123) - Share that link — it opens the rendered page in anyone's browser, anywhere in the world
Why This Works
TiniDrop serves your HTML file from Cloudflare's CDN using a standard https:// URL. Browsers load https:// URLs from the internet exactly the same as any website — your HTML is rendered as a live web page, not a downloaded file.
What If Your HTML Has External Files?
If your HTML links to local CSS or JS files (<link href="style.css">), those files won't load when served remotely — TiniDrop only serves the single file you uploaded. Solutions:
- Inline your CSS in a
<style>block and JavaScript in<script>tags - Reference external libraries via CDN URLs (Bootstrap, Tailwind, etc.)
- Zip your entire project folder and upload the ZIP — TiniDrop hosts all files and serves them correctly
Ready to share your files?
Drop any file and get a shareable link in seconds. No account needed.
Try TiniDrop free →