Write HTML, CSS and JavaScript in your browser and see the result instantly. This free online HTML editor updates the live preview as you type, shows console.log() output and errors, and lets you download your work as a ready-to-use index.html file. No sign-up, no installs.
How to use the HTML editor
- Write your markup in the HTML tab. You only need the body content; the editor adds the
<!DOCTYPE>,<head>and meta tags for you. If you paste a full HTML document, it is used as is. - Add styles in the CSS tab and scripts in the JavaScript tab.
- Watch the preview. With Auto-run on, the preview refreshes a moment after you stop typing. Turn it off for heavy scripts and press Run (or Ctrl + Enter) when you are ready.
- Check the console under the preview for
console.log(), warnings and JavaScript errors. - Save your work with Download .html, or use Copy code to paste the complete page into your own project.
Features
- Live preview of HTML, CSS and JavaScript together, in a sandboxed frame.
- Built-in console that shows logs, warnings, errors and unhandled promise rejections.
- Auto-save: your code stays in your browser, so it is still there when you come back.
- Starter templates: a starter page, a responsive navbar and a form with validation, to learn from or build on.
- Download or copy a single, complete HTML file with your CSS and JavaScript included.
- Side-by-side or stacked layout, plus a full-screen preview to test responsive designs.
- Private by design: everything runs in your browser. Your code is never uploaded to our server.
Keyboard shortcuts
- Ctrl + Enter (Cmd + Enter on Mac): run the code
- Tab: insert two spaces
- Enter: new line that keeps your indentation (and indents after
{,(,[or an opening tag) - Esc then Tab: move keyboard focus out of the editor
Frequently asked questions
Is this online HTML editor free?
Yes. It is completely free, with no account, limits or watermark.
Is my code saved?
Your code is saved automatically in your own browser (local storage). It is not sent to our server, so it will not appear on another device or in a private browsing window. To keep a permanent copy, use Download .html.
Can I use libraries like Bootstrap, Tailwind or jQuery?
Yes. Add the library’s CDN <link> or <script src="..."> tag at the top of the HTML tab and it will load in the preview, as long as you are online.
Why does my JavaScript not run?
Check the console under the preview: syntax errors and runtime errors are shown there. Also make sure your script does not run before the elements it uses exist. Code in the JavaScript tab runs after your HTML, so document.getElementById() works without waiting for page load.
Does it work on mobile?
Yes. On small screens the editor and the preview stack vertically. For longer coding sessions a laptop or desktop is more comfortable.
Is it safe to run code here?
The preview runs inside a sandboxed iframe that cannot access this website, your cookies or your account. Only run code you understand, just like you would on your own computer.
More free developer tools
JSON Formatter & Validator
Beautify, validate and minify JSON. Shows the exact line and column of errors and can fix common mistakes automatically.
Open tool →Text & patternsRegex Tester
Test JavaScript regular expressions with live match highlighting, capture groups, replace mode, common patterns and a cheat sheet.
Open tool →