Save your code as files
.html is added for you. Letters, numbers, dots, dashes, and underscores only.
Your browser decides where the files go. Browsers that can ask you to pick a file or a folder will do that, and the rest put the files in your usual downloads folder. Nothing is sent anywhere. A saved page is a normal file and is not sandboxed when you open it, so only open code you wrote or trust.
Updates as you type. Tab indents, Escape then Tab leaves.
Updates as you type
Press Run or Ctrl+Enter to run
PreviewNo network. Links and forms do nothing.
Consolealert, confirm, and prompt write here
What works here
- Use addEventListener to react to clicks and input. Inline attributes such as onclick="" are blocked, and script elements in the HTML pane do not run.
- Code that creates code from text is blocked: eval, new Function, and setTimeout with a string.
- The page cannot load anything from the network. Images must use data: addresses, network calls do not work, and links and forms do nothing.
- alert, confirm, and prompt write to the console. confirm answers true, and prompt answers with its default text or an empty string.
- Loops and functions that run for about three seconds without finishing are stopped by loop protection. Very large allocations and some regular expressions are not protected, so avoid them.