How to use
- index.htmlstyle.css, app.js
Write the code
- Previewnever sent to a serverConsole output
Run in an isolated frame
Pick a template (Blank, Flexbox, Grid, Canvas) or the sample, or write your own code in the HTML, CSS and JavaScript editors.
Press Run (Ctrl + Enter). The preview shows the result and the console shows console.log output, warnings and errors.
Turn on "Run automatically after edits" to run 0.8 s after you stop typing.
If an infinite loop hangs the frame, press Stop. The frame is discarded; fix the code and press Run again.
Use "Export as HTML file" to save the three panes as one .html file. "Save in this browser" keeps only the code in localStorage.
What it does
Your code runs in an isolated frame
Code goes into an iframe with only sandbox="allow-scripts". It has no same-origin permission, so it cannot touch this page’s DOM, cookies or localStorage. Navigating this page away, popups, form submission, automatic downloads and alert/prompt dialogs are blocked too (the frame itself can still navigate to another page).
Console and exceptions
Output from console.log, info, warn, error and debug, plus uncaught exceptions and rejected promises, appears in the console. Errors raised inside the JavaScript pane carry a line number.
Stop rebuilds the frame
Stop discards the frame and turns off auto run. Nothing runs when the page opens or when saved code is loaded, so a saved infinite loop cannot lock you out of the page.
Three editors with line numbers
HTML, CSS and JavaScript each have an editor with line numbers. Each editor holds up to 200,000 characters and the three together up to 400,000.
Saving stays on your device
Optionally save only the code to localStorage. No share link with the code in the URL is made, and you can delete the saved code any time.
Use cases
- Check how a layout or CSS (Flexbox, Grid) behaves without setting up a project
- Run a short JavaScript snippet and read its console output and error line
- Try a quick Canvas drawing or DOM experiment
- Practice in the browser and take the result away as a single HTML file
Capability matrix
| Feature | Support | Notes |
|---|---|---|
| Run HTML, CSS and JavaScript with a preview | Supported | In an isolated iframe |
| Console output and uncaught errors (with JavaScript line number) | Supported | — |
| Auto run, manual run and stop | Supported | Auto run is off by default |
| Export as an HTML file | Supported | The three panes are merged into one .html |
| Save to localStorage (code only) | Supported | Optional; deletable any time |
| Blocking network access from the code | Not supported | Code in the frame can use fetch and similar. Do not run code of unknown origin |
| npm imports, TypeScript, SCSS or other build steps | Not supported | Only HTML, CSS and JavaScript the browser understands as is |
| Server-side execution | Not supported | Everything runs in the browser |
| Sharing with others (URL or live link) | Not supported | The code is never put in a URL. Export an HTML file and send that |
| alert, confirm and prompt dialogs | Partial | Not shown; logged to the console |
Limits & notes
- Each editor holds up to 200,000 characters and the three together up to 400,000.
- The console records up to 500 entries.
- Depending on the browser, an infinite loop can slow down the whole tab. If it hangs, turn off auto run and press Stop. Nothing runs when the page opens.
- Line numbers are given only for uncaught errors raised inside the JavaScript pane, not for inline scripts you write in the HTML.
- The isolation protects this page. It does not stop code in the frame from making network requests.
- Running code works on a phone, but PC is recommended for editing in the three editors.
Privacy & safety
Your code is processed only in your browser and is not sent to a server. Only when you turn on saving is the code kept in this browser’s localStorage (deletable any time). If the code you run makes network requests, those requests come from your own code.
FAQ
Can I run HTML online here?
Can my code affect this site?
Is it an alternative to other online code playgrounds?
What happens with an infinite loop?
Can I use alert or prompt?
Is my code saved?
Related tools
Code Formatter — Format & Minify
Paste code to format it with the language auto-detected. Choose indent, line width, semicolons, quotes and trailing commas; JavaScript, CSS and HTML can also be minified with before/after size and reduction. Your code never leaves the browser.
Markdown Studio — Live Editor & Preview
A split-view Markdown editor with instant GFM preview, a table formatter that aligns pipes, an automatic table of contents and HTML export. Output is always sanitized and external images load only when you allow them.
Regex Tester
Type a pattern and matches light up in the test string instantly. Capture groups, replacement output and what each part of the pattern means are all on one screen — and patterns that would freeze your browser are stopped after one second.
Diff Tool — Text & Code Compare
Paste or drop two versions and see added and removed lines, plus the exact words that changed inside each line. Copy or save the result as a unified patch. Nothing leaves your browser.
UUID / ULID / NanoID / Token Generator
A UUID is ready the moment the page opens. Switch to UUID v7, ULID, NanoID or a random token, generate up to 10,000 at once and save them as .txt, .csv or .json. Paste an existing UUID or ULID to read its embedded time and version.
JSON Studio — Formatter & Validator
Paste JSON to format, minify or validate it instantly. Errors are shown with the exact line, column and cause, and comments or trailing commas can be auto-repaired. Your data never leaves your device.
Last updated: