Format Code Now
/

HTML Viewer

WM-24

Paste HTML on the left and see the page rendered on the right as you type. The preview runs in a sealed sandbox, so the code cannot touch this page, your cookies or your storage.

Runs in your browser. Nothing is uploaded.

HTML

Rendered page

How to use it

  1. Paste or type HTML in the left pane, open an .html file, or press Sample.
  2. Watch the rendered page update on the right. Press Full screen to see it at the size of the window.
  3. Tick Run JavaScript if the page needs its scripts, and Load web images and styles if it links to files on other sites.
  4. Use Copy HTML or Download to keep the code, or Share link to send it.

How the sandbox keeps you safe

The HTML is drawn inside an iframe with the sandbox attribute and no same-origin permission. That gives it a unique origin of its own: it cannot read this page, its cookies or its storage, cannot submit forms and cannot open pop-up windows. Scripts are blocked until you tick Run JavaScript, and when they do run they are still locked inside that origin. A content security policy is also added so the page cannot fetch anything from the network unless you allow it.

Why images or styles may be missing

By default, files hosted on other sites, such as images, stylesheets, fonts and scripts linked by address, are blocked, so viewing a page sends no requests and nobody learns that you opened it. Tick Load web images and styles to let them load. Inline styles, style blocks and images written as data: URLs always work. Relative links such as images/logo.png point at nothing here, because the pasted code has no folder around it.

Viewing email templates and snippets

The viewer is handy for checking HTML emails, exported reports and snippets copied from a page. Email templates often use tables and inline styles, which render as they would in a browser. Mail programs apply their own rules on top, so treat this as a browser preview rather than a test of every inbox. For a fragment without html and body tags, the browser adds them, just as it would for a real page.

Questions people ask

Is my HTML uploaded or stored anywhere?

No. The code is rendered by your own browser. It is not sent to a server and is not saved after you leave, unless you choose Share link, which keeps it in the address after the # sign.

Why does my JavaScript not run?

Scripts are off by default for safety. Tick Run JavaScript to run them inside the isolated sandbox, where they still cannot reach this page or your data.

Why do images from my site not appear?

Files on other sites are blocked until you tick Load web images and styles. Relative paths cannot load either, because pasted code has no folder.

Can I see the page full screen?

Yes. Press Full screen above the preview to fill the window, and press it again or press Escape to return.

Does it validate or format my HTML?

No. It shows how a browser renders the code, which tolerates many mistakes. Use an HTML formatter or validator to check the markup itself.

About this tool

The HTML is shown in a sandboxed frame that cannot reach this page, your cookies or your storage. Scripts are off until you tick Run JavaScript, and even then they run in an isolated origin. Images, stylesheets and fonts hosted on other sites are blocked by default so viewing a page makes no network requests; tick Load web images and styles to allow them, which lets those sites see the request. Forms cannot be submitted and pop-up windows are blocked.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.