Code Playground 🔒 Runs locally in your browser — nothing is uploaded.

Write HTML, CSS and JS and see the result live.

About this tool

A code playground is the fastest way to try an idea: no project to set up, no build step, no server. Type HTML, CSS and JavaScript into the three panes and the preview re-renders the moment you stop typing. It is perfect for testing a snippet from Stack Overflow, prototyping a component, or teaching how a bit of code behaves.

Everything runs locally in a sandboxed iframe inside your browser — your code is never uploaded anywhere. When you have something you like, download it as a single self-contained .html file you can open anywhere or drop into a project.

Frequently asked questions

Does my HTML/CSS/JS run on a server?

No. Everything executes in your browser inside a sandboxed iframe — there's no server-side execution, so nothing you write is ever sent anywhere.

Is the preview iframe safe to experiment in?

Yes. The preview runs with sandbox="allow-scripts allow-modals", so it can't access the parent page, read cookies, or navigate the top-level window — it's isolated from the rest of the site.

Does my code save automatically?

Yes. HTML, CSS, and JS are saved to this browser's local storage about 300ms after you stop typing, and restored automatically next time you open the playground here.

Can I use external libraries from a CDN?

You can add a <script src="https://..."> tag directly in the HTML pane to pull in a CDN-hosted library, but there's no npm/bundler support — only what a plain <script> tag can load.

Can I save my playground as a standalone file?

Yes. Download bundles your current HTML, CSS, and JS into a single .html file with inline <style> and <script> tags that opens correctly in any browser, no server needed.