Heads up — the easy free way to put an AI-built page online usually makes it public and searchable on Google. Pagelive keeps yours private →
+ +

Guide · Updated June 12, 2026

How to open an HTML file

Someone sent you an .html file — maybe a report, a proposal, or a page an AI assistant built — and clicking it didn’t do what you expected. Here’s how to open it on every device, plus the zero-setup way that works everywhere.

+ +

To open an HTML file, double-click it — it opens in your default web browser (Chrome, Edge, Safari, or Firefox) as a normal web page. If it opens as code in a text editor instead, right-click the file, choose “Open with”, and pick a browser. On phones, the easiest route is a free online HTML viewer.

+ +

By platform

Open an HTML file on any device

On Windows

Double-click the file — it opens in your default browser, usually Edge or Chrome. If Windows asks how to open it, or it lands in Notepad showing code, right-click the file and choose Open with → Microsoft Edge (or Google Chrome). To make that permanent, go to Settings → Apps → Default apps and set a browser as the default for .html files.

On Mac

Double-click the file and Safari opens it. To use a different browser, right-click (Control-click) the file and choose Open With → Chrome (or any browser). To change the default for all HTML files: select the file, press Cmd+I (Get Info), pick a browser under Open with, and click Change All.

In Chrome (any computer)

Press Ctrl+O (Cmd+O on Mac) inside Chrome and select the file — or simply drag the file onto a Chrome window. The address bar will show a file:/// path instead of a normal URL. That’s expected: it means the page is loading from your computer, not the internet.

On iPhone & iPad

iPhones don’t make this easy. Tapping an .html file in Mail or Files often shows the raw code or a half-rendered preview rather than the actual page. The fastest reliable route is online: open the free HTML viewer in Safari and upload the file there — it renders the real page immediately. (If someone sent you a link rather than a file, none of this applies: links just open.)

On Android

Tap the file in your Files app — most Android phones open it in Chrome. If you get an “open with” prompt, choose Chrome; if tapping does nothing at all, the online HTML viewer is the dependable fallback on Android too.

+ +

No setup

Or open it instantly online

Works on every device, nothing to install, nothing uploaded to a server.

tools / html-viewer

Free HTML viewer — paste or upload, see the page

Paste the code or upload the .html file and the rendered page appears instantly, in a sandboxed frame, entirely in your browser. No account, no limits, and the file never leaves your device.

+ +

Sending it onward

Need to show this page to someone else?

AI assistants increasingly hand over finished work as a single HTML file — which is why so many people are suddenly opening them. If you now need to pass the page along, don’t forward the file and make the next person repeat all of this. Publish it as a link instead: drop the file on the free publish tool and send the URL — one click to open, on any device. Here’s the full guide to sharing an HTML file, and if it’s becoming something permanent, the path from HTML to a live website. Publishing is free for up to 10 active pages — see pricing.

+ +

Frequently asked

What program opens an HTML file? +

Any web browser: Chrome, Edge, Safari, or Firefox. You almost certainly have one installed already, so there’s nothing to download. Double-click the file and it opens as a web page. Text editors can also open HTML files, but they show the code rather than the page.

Why does my HTML file open as code instead of a web page? +

It’s opening in a text editor instead of a browser. Right-click the file, choose “Open with”, and pick Chrome, Edge, Safari, or Firefox. To fix it permanently, set a browser as the default app for .html files in your system settings.

How do I open an HTML file in Chrome? +

Three ways: double-click the file if Chrome is your default browser; press Ctrl+O (Cmd+O on Mac) inside Chrome and pick the file; or drag the file onto a Chrome window. The address bar will show a file:/// path — that’s normal for a local file.

How do I run an HTML file? +

Opening it in a browser is running it — the browser renders the markup, styles, and scripts. A few features behave differently from a local file:// page than from a real website (some scripts that fetch data, for example). If something doesn’t work locally, view it in an online HTML viewer or publish it to a real URL.

Is it safe to open an HTML file someone sent me? +

HTML files can contain scripts, so treat them like any attachment: open files from people you trust. If you’re unsure, a sandboxed online viewer is the cautious option — the page renders in an isolated frame in your browser instead of running from your file system.

More like this in the guides index — including how to password-protect a page before you share it.

+ +

See the page, not the code.

Free, instant, on any device — and when you’re ready to send it onward, it’s one drop away from being a link.