HTML Viewer & Preview

: Paste HTML or open an .html file and see it rendered in a sandboxed live preview
Any size; long pages are read with a progress lineThe preview is sandboxed: scripts do not run, forms do not submit and nothing is fetched, so remote images, stylesheets and fonts stay blank. Inline <style> and data: URIs still apply. · Tidy other code: Code Formatter
Preview
The rendered page appears here. Paste HTML on the left or open an .html file.

See what a piece of HTML looks like when a browser draws it, next to the source, without letting it do anything. Paste markup from an email template, a CMS export or a chatbot answer, or open a saved .html file, and check the result at desktop, tablet or phone width.

  1. Paste HTML into the HTML pane, or press Open file or drop an .html, .htm or .xhtml file anywhere on the tool. Example loads a small demo page.
  2. Read the Preview pane. It redraws about a quarter of a second after you stop typing.
  3. Pick a width in the bar above the panes: Fit fills the pane, while 1280, 768 and 375 set the frame to that many CSS pixels and scroll sideways when the pane is narrower. Expand pane gives the preview the whole tool; Esc returns.
  4. Press Prettify source to reformat the source with Prettier, embedded CSS and JavaScript included. It replaces the text in the HTML pane.
  5. Check the line under the preview for the page title and what the sandbox held back: scripts, inline handlers, external resources and forms.

A newsletter snippet with a tracking pixel, a linked stylesheet, an inline logo and a script. Only the inline logo and the inline styles reach the preview.

Input
<!doctype html>
<html>
<head>
  <title>June update</title>
  <link rel="stylesheet" href="https://cdn.example.com/mail.css">
  <style>h1 { color: #0a7; }</style>
</head>
<body>
  <img alt="logo" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'/%3E">
  <h1>What shipped in June</h1>
  <p>Read the <a href="https://example.com/blog">full post</a>.</p>
  <img src="https://track.example.com/open.gif?id=42" width="1" height="1" alt="">
  <script>fetch("https://track.example.com/read")</script>
</body>
</html>
Output
524 B · 15 lines · 12 elements
title: June update
1 script not run
2 external resources not loaded
1 data: URI shown

Is it safe to open an untrusted HTML file here?

It is drawn in a sandboxed frame that has scripts, forms, pop-ups and same-origin access switched off, under a policy that only lets data: URIs load. A tracking pixel or remote script in the file cannot reach its server from the preview.

Why are the images missing from my page?

Images on another server, or next to the file on your disk, are blocked on purpose, so the preview never makes a network request. Images embedded as data: URIs show normally.

Can I preview HTML with JavaScript?

No. The sandbox never runs scripts, including inline event handlers. The counts under the preview tell you how many scripts and handlers were skipped, so you know the page may look different in a normal browser.

How do I check how a page looks on a phone?

Press 375 in the width bar to make the frame 375 CSS pixels wide, which triggers the page's own media queries for narrow screens. 768 and 1280 do the same for tablet and desktop widths.

Runs entirely in your browser. Nothing is uploaded.