HTML Viewer & Live Preview
Runs in your browserFree online HTML viewer with live preview. Write HTML and CSS and see the page render instantly. Scripts never run, and nothing is uploaded.
How to Use the HTML Viewer & Live Preview
- Write or paste your HTML
Type into the editor or press Import to open an .html file from your device. The sample is loaded the first time you visit, so the preview is never blank.
- Watch the preview update
The preview redraws as you type. Press Ctrl+Enter (or Cmd+Enter on a Mac) to redraw immediately.
- Check the layout on a full screen
Press the full-screen control to view the page larger. Press Escape to return to the editor.
- Copy, download or keep the draft
Copy puts the code on your clipboard and Download saves it as an .html file. Your draft is kept in this browser, so it is still there when you come back.
Previewing HTML safely, and what the preview can and cannot do
A live preview is useful for checking a layout, testing a snippet from a forum or documentation, or looking at an email template before it is sent. The risk with previews is that the code you paste may do more than you expect. Scripts can read the page, send requests or redirect the visitor. This viewer is built so that none of that happens.
The preview is drawn in a sandboxed frame with no permission to run scripts, submit forms, open windows or reach the page around it. A content policy also blocks the frame from loading remote images, fonts and stylesheets, so pasting code never makes a request to another server. Scripts are still shown in the editor so you can read them, but they are not executed.
Because remote files are blocked, a page that depends on an image or stylesheet from a web address will look incomplete in the preview. Put the CSS inside a style element and embed small images as data URIs or inline SVG. That is also the way to get an accurate picture of how the markup renders on its own.
Good to know
Privacy
Your HTML is previewed in a sandboxed frame on your own device. Scripts are never run, remote files are never fetched, and nothing is uploaded. Your draft is kept only in this browser so it survives a page reload.
Frequently Asked Questions
Is it safe to paste HTML from an unknown source?
Yes, as far as the preview goes. The code is drawn in a frame that cannot run scripts, submit forms, open windows or access this page. Remote images, fonts and stylesheets are blocked, so nothing contacts another server. You should still avoid trusting code you copy into a live website without reading it first.
Does the viewer upload my code to ToolMatic?
No. Everything happens in your browser. ToolMatic.co does not receive the HTML you write, import or preview.
Why does my JavaScript not run in the preview?
The preview deliberately does not run scripts, so that pasted code cannot do anything to your device or to the page. You can still read the script in the editor and copy it to test in your own project.
Why are my images or fonts missing?
Files that load from a web address are blocked in the preview. Embed small images as data URIs, use inline SVG, or install the font locally and reference it by name.
Can I use a CSS framework such as Tailwind or Bootstrap?
Not from a CDN link, because remote stylesheets are blocked. Paste the CSS you need into a style element, or use the rules you need directly.
Is my draft saved?
Yes. The draft is stored in this browser only, so it is still there when you return on the same device. Press Clear to empty the editor and the saved draft. Nothing is stored on a server.
What is the file size limit for importing?
You can import a text file of up to 1 MB. Larger files are rejected so the editor stays responsive.