Home › Developer Tools › JavaScript Editor

Online JavaScript Editor and Console

Write JavaScript, run it in a sandbox and see console output and errors. Optional HTML lets you work with the DOM.

How to use JavaScript Editor

Step by step

1

Write your code

Type or paste JavaScript. Add HTML if you need elements.

2

Press Run

Or press Ctrl+Enter. Output appears in the console box.

3

Copy or download

Copy the code or save it as a file.

Features and benefits

What you get

Live preview

Your page is shown in a sandboxed frame.

Sandboxed

The preview cannot read this site or your files; it runs in an isolated frame.

Format with one click

Tidy your code using the built-in formatter.

No sign-up

Open the page and start.

Supported formats and limitations

What to expect

Supported formats

JavaScript and HTML

Size limits

Limited by browser memory

Limitations

Runs in a sandboxed frame. An endless loop can freeze the tab; close or reload the page if that happens.

Frequently asked questions

Quick answers

Where does the code run?

In an isolated, sandboxed frame inside your browser. It cannot read this site, cookies or your files.

Can I use fetch?

Network requests from the frame are limited by the browser sandbox and may fail.

Related tools

More from Developer Tools

Related guides

Read more about this tool