Skip to main content
coltool

Run JavaScript Online

Write and run JavaScript snippets right in your browser and see the output instantly.

Click “Run” to see the output

What does this tool do?

You want to sanity-check a regex, poke at an array method, or reproduce an interview puzzle — multi-line code in the DevTools console is painful, and spinning up a local project is overkill. This page gives you an editor with syntax highlighting, bracket matching and code folding (powered by CodeMirror 6). Hit Run or press Cmd/Ctrl + Enter and the output panel on the right shows results color-coded by log / info / warn / error, with top-level await and return-value echo supported.

Your code is auto-saved locally and survives page reloads; it executes only in your browser and is never uploaded or stored on a server.

How to use

  1. Write or paste JavaScript in the editor on the left;
  2. Click “Run” or press Cmd/Ctrl + Enter;
  3. Click “Clear code” to start over; press Cmd/Ctrl + Z immediately if you cleared it by mistake;
  4. Read the color-coded output on the right; “Clear output” resets it.

FAQ

Where does my code run? Is it safe?
Code executes directly in the current page of your own browser and is never sent to a server. For the same reason, only run code you trust — it has the same execution environment as the page.
Are async/await and top-level await supported?
Yes. Your code is wrapped in an async function, so you can use await at the top level — for example, await fetch(...) and log the result.
What output can I see besides console.log?
console.log / info / warn / error are color-coded by level; an explicit return value is echoed with a "<" prefix like in DevTools; thrown exceptions show up in red.
Will I lose my code?
No. The editor content is saved to localStorage as you type and restored on your next visit. Clearing browser data resets it to the sample snippet.