Local · Private · Free

Code Playground

Write HTML, CSS and JavaScript and see it run instantly — a sandboxed live preview and a captured console, all on your device.

on input
HTML
CSS
JavaScript

Your code runs locally and sandboxed in this tab — nothing is uploaded, and it cannot touch this page or your other tabs.

About Code Playground

Code Playground is a free, private text & code tool that runs entirely in your web browser. Write HTML, CSS & JS with a live preview and console — a local CodePen. Because everything happens locally on your device, your files and data are never uploaded to a server, there is no sign-up or installation required, and it keeps working offline. It is handy for code playground, html, css, js. Like every HeroTool by Digital Heroes, Code Playground is 100% free with no limits.

How to use Code Playground

  1. Open Code Playground — it runs entirely in your browser, with no signup.
  2. Paste or type your text or code into the editor.
  3. Adjust the options to match exactly what you need.
  4. Copy or download your result — it is free, and your data stays on your device.

Frequently asked questions

Is Code Playground free?

Yes — Code Playground is completely free for everyone. No sign-up, no account and no usage limits.

Is it private? Are my files uploaded anywhere?

No. Code Playground runs entirely in your browser on your own device, so your data never leaves your computer and nothing is uploaded to a server.

Does it work offline?

Yes. HeroTools is a Progressive Web App — once the page has loaded it keeps working offline, and you can install it as an app from your browser.

Do I need to install anything or create an account?

No. Just open the page and start using it. Installing it as an app is optional and only adds offline convenience.

What does Code Playground do?

Write HTML, CSS & JS with a live preview and console — a local CodePen.

" inside a string/template — neutralise it // so it cannot break out of the " at parse time, so behaviour is preserved. function safeJs(js){ return String(js).replace(/<\/(script)/gi, '<\\/$1'); } function buildSrcdoc(){ var userJs = safeJs(elJs.value); return [ '', '', '', '', SHIM, '', elHtml.value, '