HTML Viewer

Preview HTML safely, or read the formatted source.

About HTML Viewer

Preview an HTML file after it has been sanitised, or read it as pretty-printed source. Scripts, styles, forms and remote images are removed before anything is shown, so opening an untrusted file is safe.

An HTML file from an unknown source is executable content. Opening it directly runs its scripts, loads its images and reports back to whoever wrote it.

Render it in a sandbox, or read the source as highlighted markup.

  • Processed on your deviceEverything you open or type here is handled by this page and never uploaded anywhere.
  • No queue, no limitsNothing waits on a server, so the only limit is your own hardware.
  • No account neededNo sign-up and no email address required.

How HTML Viewer works in your browser

The preview shows the markup after DOMPurify has sanitised it: scripts, event handlers, style sheets and forms are removed, and images or media that point at a remote address are dropped, so nothing in the document executes and no tracking pixel is fetched. Because its own styles are removed, you see the content in this site’s typography rather than the page as designed.

The source view parses the markup with the browser’s own parser inside an inert document — the same parser, without the execution — and re-indents it so the structure is readable.

That combination is the useful part: the rendered view tells you what a document looks like, and the source view tells you what it actually contains, including the remote resources it would have loaded.

When to use it

  • Opening an HTML attachment safely, which is a common phishing vector.
  • Reading a saved page or an exported report without letting it phone home.
  • Inspecting the markup of a file before publishing or embedding it.
  • Checking what a marketing email would load before opening it in a mail client.

Frequently asked questions

Is it safe to open an untrusted HTML file?

Yes. The markup is sanitised before it is shown: scripts, event handlers, styles and forms are stripped and remote images and media are dropped, so nothing in the file can execute or call out.

Can I read the source instead of the rendering?

Yes. Switch to the formatted or raw view for the markup itself, indented for reading — useful for inspecting an email template or a page you have been sent.

Will external images and styles load?

No. Remote resources are not fetched, which keeps the file from calling home. Anything embedded in the file itself still displays.