All tools

HTML editor

Write HTML on the left and see it render live on the right, sandboxed and entirely in your browser.

Preview sandboxed
Characters 0 Lines 0

The preview renders inside a sandboxed iframe. With scripts off, any JavaScript in your markup is ignored; with scripts on, it runs isolated from this page. Nothing you type is uploaded. The editor works entirely in your browser.

How the live HTML editor works

Type or paste HTML in the left pane and the right pane re-renders as you go. There is no build step and no server round-trip. The preview is a sandboxed <iframe> whose srcdoc is set to exactly the markup you typed, refreshed a fraction of a second after you stop typing. Because the editor is a plain text area, it handles complete documents (DOCTYPE, <head>, inline <style> and <body>), not just fragments. Your work autosaves to your browser's local storage, so the page resumes where you left off after a refresh.

Scripts off vs scripts on

By default the preview runs with scripts disabled. The frame uses sandbox="", so any <script> in your markup is inert: the HTML and CSS render, but JavaScript never executes. That makes it safe to paste code from anywhere. When you need to test interactive behaviour, switch the toggle to Scripts on and the preview is rebuilt with sandbox="allow-scripts", which lets scripts run inside the frame while still walling them off from this page and your data. A warning shows whenever scripts are enabled. Treat it as a reminder to only run code you trust.

Everything stays in your browser

No markup is uploaded, logged, or sent anywhere. The editor, the live preview, the character and line counts, and the autosave all run locally with native browser APIs, so the tool keeps working offline once the page has loaded. Use Copy to put the current HTML on your clipboard, Download to save it as a standalone .html file you can open directly, or Clear to start over. Clearing also empties the saved copy so nothing lingers.

Good for quick prototypes and snippets

This is a scratchpad, not an IDE, and that is the point. It is quick for checking a layout idea, previewing an email template, debugging a stubborn CSS rule, testing a component in isolation, or confirming how a snippet from documentation actually behaves, all without spinning up a project. Just remember the frame is sandboxed: relative paths and cross-origin requests are blocked, so inline your CSS and embed images as data URIs to see the complete result.

Frequently asked questions

Does the HTML editor run my JavaScript?

Not unless you turn it on. The preview starts in a scripts-off sandbox, so script tags and inline event handlers do nothing. Only HTML and CSS render. Switch the toggle to Scripts on to run JavaScript inside an isolated frame that still can't reach this page or your data.

Is my HTML sent to a server?

No. Everything happens in your browser using native APIs. Your markup is never uploaded; it is only kept in your own device's local storage so the editor can restore it after a refresh. The tool keeps working offline once loaded.

Can I edit a full HTML document, including the head?

Yes. The left pane is a plain text editor, so you can write a complete document with a DOCTYPE, head, meta, an inline style block and a body. The preview renders it exactly as a browser would, which is why style blocks and layout behave the way they will on a real page.

How do I save or export my work?

Your HTML autosaves to local storage as you type, so it survives a page refresh. Use Copy to send the current markup to your clipboard, or Download to save it as a standalone .html file you can open or share. Clear empties the editor and clears the saved copy.

Why don't my images or external stylesheets load in the preview?

The preview runs in a sandboxed frame with no same-origin access, so relative paths and many cross-origin requests are blocked by design. That keeps the tool safe and self-contained. Inline your CSS in a style block and embed images as data URIs to see them render.