Write HTML, CSS and JavaScript in three editors and see the result live in a sandboxed preview.
The HTML/CSS/JS Live Preview lets you write a web page in three separate editors, one for HTML, one for CSS and one for JavaScript, and see the result update as you type. The page runs inside a sandboxed frame, and a console panel shows what your JavaScript prints. It is meant for quick experiments, demos, bug reproductions and learning.
A web page is built from three layers: HTML describes the content and structure, CSS describes how it looks, and JavaScript describes how it behaves. Keeping them in separate editors makes each part easy to read and edit. To show the result, this tool combines your three parts into one complete page and loads it into an iframe, a page embedded inside this page. The iframe has the sandbox attribute set to allow scripts only. Without the allow-same-origin permission, the browser gives the frame an opaque origin of its own, so your code cannot read this site's cookies, local storage or data. A Content-Security-Policy tag inside the page also stops it from loading anything from the internet unless you allow it. Your JavaScript really does run, so this is isolation for experiments, not a guarantee that any code is harmless.
No. The three editors are combined in your browser and shown in a frame on this page, and nothing is uploaded. If you tick Allow external resources and your page asks for an https image, script or other file, your browser fetches it from that site, as it would for any web page.
No. The frame is sandboxed with scripts allowed and nothing else, so it gets its own isolated origin without access to this site's cookies, storage or data. Treat this as strong isolation for experiments, not as permission to run code you do not trust.
Yes. Tick Allow external resources (https) and add a script tag with an https address in the HTML editor. With the box unticked the script is blocked.
The preview frame, and possibly your browser tab, will stop responding, because this tool has no time limit on your JavaScript. Close or reload the page to recover, and be careful with while loops that never end.
No. The editors are held in the page only, so a reload loses them. Use Copy on each editor or Download .html to keep your work.
They only change the width of the preview frame to 1024, 768 or 375 pixels. Media queries in your CSS react to that width, but touch events, device pixel ratio and mobile browser behaviour are not emulated.