Tools › Build › Code Playground
⚡

HTML, CSS & JavaScript Playground

Write HTML, CSS and JavaScript and watch the result update instantly — experiment, learn and prototype right in your browser.

✅ 100% Private
⚡ Live Preview
💾 Auto-saves Your Code
Start from a template:
1
👁 Live preview
🖥 Console 0
Advertisement

How to use

  1. Pick a template to start, or write your own code in the HTML, CSS and JavaScript tabs.
  2. Watch the Live preview update as you type. Switch off Auto-run and press Run (or Ctrl/Cmd + Enter) if you prefer to run manually.
  3. Use the Desktop / Tablet / Mobile buttons to test how your page looks at different widths, or open it Fullscreen or in a new tab.
  4. Check the Console below the preview for console.log output, warnings and errors.
  5. When you are happy, Copy the code of the current tab or Download everything as one HTML file.

How the playground works

Your HTML, CSS and JavaScript are combined into one page and shown in a sandboxed frame, so your code cannot touch this website or your other tabs. console.log, console.info, console.warn, console.error, console.table and runtime errors appear in the console panel. Your code is saved in your browser automatically.

Shortcuts: Ctrl/Cmd + Enter runs the code and Tab indents. Press Esc first if you want Tab to move focus out of the editor instead.

What can you build here?

It is ideal for learning web development, trying out a CSS layout, testing a JavaScript snippet, building a small widget, or reproducing a bug before asking for help. The templates (Hello World, Digital Clock, Counter and Gradient) show how HTML, CSS and JavaScript work together. Everything runs offline once the page has loaded, and external scripts are only loaded if you add them yourself.

Frequently asked questions

Is this code playground free?

Yes, it is completely free with no account needed. Your code runs in your own browser and is never uploaded.

Is my code saved?

It is saved automatically in your browser (local storage), so it is still there when you return on the same device. It is not synced between devices, and clearing site data removes it, so use Download for anything important.

Can I use external libraries like jQuery or Bootstrap?

Yes. Add a <script src="…"> or <link rel="stylesheet" href="…"> tag for a CDN-hosted library in the HTML tab. This needs an internet connection.

Why does my code say localStorage or cookies are not allowed?

The preview runs in a sandbox with no access to this website’s storage or cookies, which keeps your code and this site safe. Code that needs storage will report a security error here, but works normally when you download the file and open it in a browser.

What if my code has an infinite loop?

A loop that never ends can freeze the preview or the tab. If that happens, close the tab and reopen the playground: it detects that the last run did not finish, switches Auto-run off and shows a warning, so you can fix the code safely before running it again.

How do I test my design on mobile?

Use the Tablet (768 px) and Mobile (375 px) buttons above the preview to narrow the frame, so media queries and responsive layouts behave as they would on those screens.

Can I share what I built?

Press Download to get a single HTML file you can send or host anywhere, or use New tab to open the result as a standalone page.

Does it support TypeScript, React or Sass?

No. This playground runs plain HTML, CSS and JavaScript exactly as the browser understands them, which makes it quick and dependency-free.