NV ToolkitFormat · Validate · Convert

HTML Tools

HTML Viewer — Code & Live Preview

Paste markup, see the page — sandboxed live preview beside prettier-formatted source.

In short

View HTML online with a live sandboxed preview next to formatted source: paste markup, see it rendered instantly — scripts disabled for safety. Free.

By NaveenKumar T · Updated

Learn: How to Convert Excel to JSON (Without Writing Code)

  • Live sandboxed preview
  • Scripts disabled for safety
  • Prettier-formatted source

Runs entirely in your browser — nothing you paste or open here is uploaded, logged, or stored.How we handle data →

Example

HTML Viewer: input and output

A product card pasted with ragged indentation — the Code view shows the formatted source, Preview renders it.

Pasted HTML
<section class="card">
<img src="https://example.com/img/kettle.jpg" alt="Steel kettle"   width=320>
      <h2>Steel kettle</h2>
  <p>1.7 L, 2200 W. <a href="https://example.com/kettle">Details</a></p>
<p class="price">€39 <small>incl. VAT</small></p>
</section>
Formatted source
<section class="card">
  <img
    src="https://example.com/img/kettle.jpg"
    alt="Steel kettle"
    width="320"
  />
  <h2>Steel kettle</h2>
  <p>1.7 L, 2200 W. <a href="https://example.com/kettle">Details</a></p>
  <p class="price">€39 <small>incl. VAT</small></p>
</section>

Prettier normalized the indentation, quoted the bare width=320 attribute and closed the void <img> as <img … /> with its attributes one per line because the tag ran past 80 columns; the inline <a> and <small> stayed on the same line as their text, so the rendering is unchanged.

Learn more

A safe place to render untrusted HTML

Opening random HTML files in your browser executes their scripts — a real risk with email templates, user-generated content, and downloaded pages. This viewer renders inside a locked-down sandbox: you see exactly what the markup produces visually while everything executable stays disabled.

It doubles as a rapid prototyping scratchpad: edit on the left, see the result on the right, no files or servers involved.

Who reaches for an HTML viewer

Support engineers checking what a customer's exported template actually looks like; marketers previewing an agency's email before it goes anywhere near the ESP; developers verifying a generated invoice or report renders correctly; security-conscious users who'd rather not double-click an .html attachment. The common need is rendering without executing — see the page, skip the scripts — which is precisely the sandbox's design.

For iterative work the companion HTML Editor adds full editing ergonomics; this page optimizes for the paste-look-decide moment, where speed matters more than tooling.

Help

Frequently asked questions

Everything you need to know about the HTML Viewer.

01How do I use the HTML Viewer?

Paste HTML (or drop a file) and the rendered preview appears immediately — the hero button re-renders after edits. Switch the output to Code to read the formatted source instead.

02Why doesn't JavaScript run in the preview?

The preview frame is sandboxed with scripts disabled — deliberately. It lets you safely preview HTML from ANY source (emails, user submissions, scraped pages) without executing what's inside. Layout, styles, and content render fully; only active code is inert.

03Why are my images or stylesheets missing in the preview?

The preview is a srcdoc iframe with an empty sandbox attribute: an opaque origin, no scripts, no form submission. Subresources still load, but relative paths such as /img/logo.png resolve against this site rather than yours and come back as 404s — that is the usual cause of a broken image or an unstyled page. Use absolute https:// URLs for images and external stylesheets, or paste the CSS into a <style> block, and the preview matches what your page will show.

Keep working

Related tools

Learn the format

Related guides

All guides →