Skip to content
Free tool · runs in your browser

Online HTML viewer

Open an .html file from your device — or paste the code — and see the page it describes, with CSS and JavaScript running. Switch between phone, tablet and desktop widths. Nothing leaves your browser.

Show / edit the HTML code

How to view an HTML file online

  1. Drop the .html or .htm file onto the box above, or click it and choose the file. On a phone, pick it from Files or Downloads.
  2. The page renders immediately below. Use Phone, Tablet and Desktop to check how it behaves at each width, or Full screen to see it edge to edge.
  3. Open Show / edit the HTML code to read or change the source — the view updates as you type.

The file is read by your browser with the File API and rendered in a sandboxed frame. It is never uploaded, so this viewer is safe for private documents, exported reports and email templates.

Is it safe to open an unknown HTML file?

An HTML file can contain JavaScript, and a malicious one opened directly from your downloads folder runs with the permissions of a local file. Here it runs inside a sandboxed iframe that cannot read this site's cookies or storage, cannot navigate this tab, and has no access to other files on your computer. That makes this viewer a sensible way to look inside an attachment you are unsure about. It is still a web page, though — do not type passwords into a form inside a file someone sent you.

Why the page looks different from the original

  • Missing images and styles. If the HTML loads style.css or img/photo.jpg from its own folder, those files were not part of the single file you opened. Upload the folder as a ZIP with the ZIP to URL converter to see it complete.
  • Saved web pages. "Save page as → HTML only" keeps the markup but not the assets; "Web page, complete" saves a folder next to the file.
  • Email HTML. Email templates are designed for mail clients, which ignore some CSS. Browsers show them more generously than Outlook will.

HTML viewer apps vs an online viewer

On Android and iPhone, dedicated "HTML viewer" apps mostly show the source code. An online viewer renders the page instead, needs no install and works the same on every device. If you need someone else to see the page, a viewer is not enough — publish it as a URL with Publish as URL and send them the link.

Related guides

Frequently asked questions

How do I view an HTML file in my browser?

Drop it onto the viewer on this page, or open it from your computer with File → Open in any browser. This viewer adds phone and tablet widths and a code editor.

Does the HTML viewer upload my file?

No. The file is read and rendered locally in your browser. It only leaves your device if you press Publish as URL and then publish it.

Can I view HTML with CSS and JavaScript?

Yes. Inline and CDN-hosted CSS and JavaScript run normally in the preview frame. Files the page loads from its own folder need the whole folder — use ZIP to URL.

How do I share the page I am viewing?

Press Publish as URL. The code moves to the converter, where you can publish it to a link like name.htmltourl.dev.

More free tools

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