Run JavaScript with a console and top level await, no network access
HTML, CSS and JS Playground
Build and test a small page or widget with HTML, CSS and JavaScript side by side, with a real console.
Loading tool…
How to use html, css and js playground
Switch between the HTML, CSS and JS editors with the tabs above the code.
Leave Run as I type on, or turn it off and press Run when you are ready.
Click around in the result; console.log output and errors appear under it.
Press Stop to end timers and animations, or Reset to example to start over.
What this tool does
- Runs your code in a sandboxed frame with its own blank origin: it cannot read this site, your cookies or your storage.
- A content security policy inside the frame blocks every network request, including fetch, images from URLs and script imports.
- The console shows log, info, warn and error output, objects, arrays, uncaught errors with line numbers and rejected promises.
- alert, confirm and prompt are shown in the console instead of blocking the page.
How the result is verified
The preview is the browser running your actual code. Console lines are tagged with an id for each run, so messages from an older run never mix with the current one.
Frequently asked questions
Can the code I run here harm my computer or read my data?
The frame runs with sandbox="allow-scripts" and no same-origin permission, so it is treated like a site with no identity: it cannot read this page, cookies or storage, open pop-ups or navigate the tab, and its policy blocks network requests.
Where does my code go?
It stays in this browser. The three editors are saved to local storage so they are there next time, and you can clear them with Reset to example.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Live CSS editor with HTML to style, presets and phone width preview
Indent HTML neatly while keeping pre, textarea and script content intact
Highlighted code pictures with themes and backgrounds, saved as PNG or SVG