How to use the HTML online editor
- Write your markup on the index.html tab, your styles on style.css and your code on script.js.
- The preview updates as you type. Turn off Auto-run to update it only when you press Run or Ctrl + Enter.
- Check how the page looks on a tablet or a phone, and read
console.logoutput and errors under the preview. - Press Share to copy a link with your code, or Download to save one .html file with everything in it.
What you can build
- Web pages and layouts: practise HTML tags, Flexbox and Grid, and see the result at once.
- Interactive pages: buttons, forms and DOM changes with JavaScript, with the console right below.
- Canvas and animations: draw with the Canvas API or animate with CSS.
- Libraries from a CDN: add a .js or .css link (for example from cdnjs or jsDelivr) with Add library.
Your code runs in an isolated frame: it cannot read this site's data, and nothing is sent to a server unless your own code does it.
Frequently asked questions
How do I run HTML code online?
Type your HTML on the index.html tab and the preview shows the page as you type. Add styles on style.css and code on script.js; they are joined into one page for the preview.
Can I use JavaScript and see console.log?
Yes. Messages from console.log, warnings and errors appear in the Console under the preview, with the line number for errors.
Can I see how my page looks on a phone?
Yes. Use the Phone and Tablet buttons above the preview to see the page at those widths, or Full screen to see it alone.
Can I use libraries like Bootstrap or jQuery?
Yes. Press Add library and paste the https link of the .css or .js file from a CDN such as cdnjs or jsDelivr.
How do I save or share my code?
Your code is kept in this browser. Share copies a link that contains the code, and Download .html saves one file with your HTML, CSS and JavaScript.
Is it safe to run code from a shared link?
The preview runs in an isolated frame that cannot read this site's cookies or data, open windows or leave the page.
Related tools
- AI Code Generator: Python, C++, Java and MoreFree AI code generator. Describe what you need, get a complete runnable program with an explanation, and run it in the online editor. 13 languages.
- AI Code Checker: Explain and Fix Code OnlinePaste your code and let AI explain it in plain language or find and fix bugs. Python, C++, Java, JavaScript and 9 more languages. Free account.
- SQL Online Compiler: Run SQLite and PostgreSQL QueriesRun SQL online in your browser with SQLite or PostgreSQL. Sample databases, schema view, one result table per query, CSV import and export. Free, no sign-up.