Skip to main content

HTML Live Preview

Write HTML, CSS and JavaScript and see the result render as you type.

HTML Live Preview

No account, no saving, no setup — just a scratchpad that runs in your browser.

A scratchpad for HTML, CSS and JavaScript that renders as you type, with a choice of stacked or side-by-side layout. It is deliberately minimal: no account, no saving, no sharing, so there is nothing between opening the page and testing something.

HTML Live Preview: Features

Built for the five-minute question

Most of the time you open an online editor, the question is small: does this selector match, does this flex property do what I remember, does this snippet throw. Full-featured playgrounds answer those questions too, after you sign in, wait for an editor to boot and dismiss a prompt about saving. This does the same job with nothing in the way, which is the entire design goal.

What it deliberately does not do

There is no account, no saved history, no sharing link and no collaboration. If you need to send a reproduction to a colleague, keep a library of experiments, or work with someone in real time, a hosted playground is the right tool and this is not. Knowing which problem you have saves picking the wrong one: this is a scratchpad, not a workspace.

Two layouts for two situations

Side by side suits CSS work, where you want to see the effect of a change in the same glance as the change itself. Stacked gives the editor more width, which suits writing markup or a longer script where line wrapping is the bigger annoyance. Switching between them is one click, and the right choice usually changes as you move from writing to adjusting.

The preview is a sandboxed frame

Your code runs inside an isolated frame rather than in the page itself, so a script that throws, a style that resets everything, or markup that never closes affects only the preview. That isolation is also why the preview cannot reach into the surrounding page, which is the correct behaviour for something running arbitrary code.

Nothing is saved, so copy before you close the tab

Your code runs in your browser and is never transmitted, stored or logged. It is also not saved, which is the flip side: closing the tab discards everything, so copy anything worth keeping before you navigate away. External libraries loaded from a CDN in your markup will work, subject to the usual cross-origin rules.

HTML Live Preview: FAQ

Can I load an external library?

Yes, by adding a script tag pointing at a CDN in your HTML, exactly as you would in a real page. Most libraries distributed this way will work. Anything requiring a build step or a module bundler will not, since there is no build here.

Does JavaScript run?

Yes, inside the sandboxed preview frame. Errors show in your browser console as usual. Because the frame is isolated, a script that throws or a stylesheet that resets everything affects only the preview, not the surrounding page.

Can I test responsive layouts?

To a degree. Resizing the browser window changes the preview width, which exercises your media queries. For proper device testing, your browser's own device emulation gives you accurate viewport sizes and touch simulation, which a preview pane cannot.

Is my code sent to a server?

No, other than any external resources your own markup chooses to load. The editor and preview themselves make no network requests with your content.

How to Use HTML Live Preview

  1. Write or paste your code

    Put your markup, styles and script into the editor. Press Sample to load a small working example if you want something to modify rather than starting from an empty page.

  2. Choose a layout

    Use side by side when adjusting CSS so you can see the change and its effect together, or stacked when writing longer markup and you want the editor wider.

  3. Copy anything worth keeping

    The preview updates as you type. Nothing is saved, so copy the code out before closing the tab if the experiment turned into something you want.

Category Design