How to run JavaScript online without installing anything
Try it now: JavaScript Runner, free and private in your browser.
Open JavaScript RunnerYou do not need Node.js or an editor to try JavaScript. Every browser can run it, and an online runner makes it even easier to test an idea, check a snippet or learn the language.
Three ways to run JavaScript with no install
- The browser console: press F12 (or Cmd+Option+J on Mac), open Console and type code. Good for quick checks.
- An online runner: write several lines, press Run and see the output. Better for anything longer than one line.
- A local file: save an HTML file with a script tag. Needs an editor, so skip it for now.
Run your first script
Open the runner, paste this, and press Run:
const names = ["Ana", "Sam", "Lee"];
console.log(names.map(n => n.toUpperCase()));
The result appears in the console panel. Use console.log to print any value, console.warn for warnings and console.error for errors.
Async code and fetch
Modern JavaScript uses async and await for things that take time, such as network requests. In the runner you can use await at the top level:
const res = await fetch("https://api.github.com/zen");
console.log(await res.text());
What an online runner cannot do
- It has no page, so
documentandwindoware not available. Use an HTML playground for DOM work. - It cannot read files on your computer or install npm packages.
- Long runs are stopped, because an endless loop would freeze your browser.
Debug the most common mistakes
- ReferenceError: x is not defined: you used a variable before declaring it, or misspelled it.
- undefined in the output: a function with no
return, or a property that does not exist. - A Promise instead of data: you forgot
await. - Unexpected token: a missing bracket, comma or quote.
Staying safe
Only run code you understand. Never paste code from a stranger, especially code that asks for passwords or sends data to another site. Our runner executes in a background worker, separate from the page.
FAQ
- Is it free?
- Yes, with no sign-up.
- Does it support modern JavaScript?
- Yes. It runs whatever your browser supports, including classes, async functions and top-level await.
- Can I use npm packages?
- Not here. For packages you need Node.js or a full online IDE.
- Can I run TypeScript?
- Not directly. Compile it to JavaScript first.