JavaScript · online compiler

Run JavaScript online

Run JavaScript online — Node 20/22/23/24/25/26, real V8, in a Firecracker microVM.

Firecracker microVM live per-test verdicts multi-file compile

JavaScript is the most-deployed language on Earth — the browser is the runtime everyone has. Server-side, Node ate the world; TypeScript is JavaScript-with-types (see /lang/typescript).

ls-judge runs JavaScript on real Node.js: Node 20 LTS, Node 22 (LTS), Node 23, Node 24, Node 25, and Node 26 (current LTS). V8 is V8. The event loop actually loops.

Bring a single .js file (single-file console script) or multi-file with `require`/`import` — external `node_modules` are unavailable (no network), but pasted local modules work.

Perfect for JSON munging, algorithm work, HTTP-request-parsing challenges — Node's stdlib is generous.

Starter code

What you get in JavaScript

Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.

javascript
JavaScript 26
const lines = [];
process.stdin.on('data', d => lines.push(d.toString()));
process.stdin.on('end', () => {
  const n = parseInt(lines.join('').trim());
  console.log(n * 2);
});
stdin →21
expected →42
FAQ

Common questions about JavaScript on ls-judge

Node versions?
Node 20 (LTS), 22 (LTS), 23, 24, 25, and 26 (LTS).
ES Modules or CommonJS?
Both. If your file has import/export, it is treated as ESM; else CJS.
npm packages?
No — no network in the sandbox. Bring bundled source instead (rollup/esbuild output pasted in).
Deno / Bun?
Node only for now. Bun support is on the roadmap.
Further reading
Also try