DevTools Logo

HTML Editor

HTML Editor

Write HTML, CSS, and JavaScript with live preview

HTML Code

Templates

Tips

  • Edit HTML, CSS, and JavaScript in real-time
  • Preview updates automatically (toggle auto-run to manual)
  • Console output captured from iframe (click Console to expand)
  • Expand button for full-screen preview mode
  • Download your HTML as an index.html file

Live Preview

Console

About this tool

HTML Editor runs entirely in your browser on DevTools — no signup, no upload.

What this tool does not do

  • HTML Editor is a free in-browser utility, not a hosted API, and keeps no server-side history.

How to use this tool

  1. Using HTML Editor

    Open HTML Editor, enter or paste your input, and copy the result.

Frequently asked questions

Does the live preview execute my code?

Yes, in a sandboxed iframe built with srcdoc. Scripts run in the preview, isolated from the parent page.

Why is HTML in Code Playgrounds?

It uses the same full-width editor-first layout as JS, TS, Dart and Ruby, with a live preview and console below the combined HTML document.

When should I use the JavaScript Playground instead?

When you want console.log output from a script without a page. Use this editor when you need HTML and CSS with a live DOM.

Is my HTML uploaded?

No. Markup stays in your browser and localStorage.