How to use the Online HTML Editor
- Write markup in HTML, styles in CSS and scripts in JavaScript.
- The preview updates as you type (turn off Auto-run for heavy scripts and press Run or Ctrl+Enter).
- Check
console.logoutput and errors below the preview. - 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?
Can I use external libraries?
<script> or <link> tags pointing to a CDN in the HTML pane.