Online HTML, CSS & JavaScript Editor

A lightweight code playground: edit HTML, CSS and JavaScript side by side, see the result instantly, read console output and download your page as one HTML file.

Runs in your browserUpdated
Template
Console

Your code is saved in this browser automatically. The preview runs in a sandboxed frame without access to this site.

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the Online HTML Editor

  1. Write markup in HTML, styles in CSS and scripts in JavaScript.
  2. The preview updates as you type (turn off Auto-run for heavy scripts and press Run or Ctrl+Enter).
  3. Check console.log output and errors below the preview.
  4. Click Download .html to save everything as one file.

A quick HTML playground

Sometimes you just need to try a snippet: check how a CSS property behaves, debug a layout, prototype a component or test code from a tutorial. This editor gives you the three classic panes and a live preview without accounts, projects or build steps. Your work is stored in your browser (local storage), so it is still there when you come back.

How the preview is isolated

The result runs in an <iframe sandbox> without the allow-same-origin permission. That gives the page its own unique origin: scripts can run, use alerts and forms, but cannot read this site’s cookies or storage. It is the same approach used by CodePen and JSFiddle.

Tips

  • Tab inserts two spaces instead of leaving the editor.
  • Load libraries from a CDN with a normal tag in the HTML pane, for example <script src="https://cdn.jsdelivr.net/npm/…"></script>.
  • Runtime errors and rejected promises appear in the console panel with their line number.
  • The downloaded file contains your HTML, CSS and JS in one document — ready to open locally or upload.

Beyond the playground

Clean up code with the HTML formatter, CSS formatter and JavaScript formatter, or shrink it for production with the HTML minifier and JavaScript minifier.

Tools that pair well with the Online HTML Editor

  • Markdown to HTML — Write or paste Markdown and get clean HTML instantly — with a sanitised live preview, GitHub-flavoured tables, task lists and fenced code blocks.
  • CSS Minifier — Paste a stylesheet to shrink it instantly.
  • SQL Formatter — Paste a query — or a whole migration — and get readable SQL with one clause per line, aligned joins and consistent keyword case, using the grammar of your database.
  • Regex Tester — Type a pattern and watch matches highlight live in your test text.

Frequently asked questions

Is my code saved?
Yes, automatically in this browser’s local storage. It is not uploaded; clear site data or click a template to start over.
Can I use external libraries?
Yes — add <script> or <link> tags pointing to a CDN in the HTML pane.
Is it safe to run untrusted code here?
The preview runs in a sandboxed iframe with its own origin, so it cannot access this site. It still runs in your browser, so only run code you are comfortable executing.
Does it support TypeScript, SCSS or React JSX?
No — the preview runs plain HTML, CSS and JavaScript. Compile other languages first.

Related tools