Search tools

Search for a command to run...

JavaScript & TypeScript Playground

Run JavaScript or TypeScript in your browser with a real console — console.log, console.table, async/await, fetch and timers. Stop runaway loops, and share snippets as a link.

How to use

  1. 1Write or paste code (or load an example).
  2. 2Press Run or Ctrl+Enter — output appears in the console panel.
  3. 3Use Share link to send the snippet to someone; the code travels inside the link.

Frequently asked questions

Is my code sent to a server?

No. It runs in an isolated Web Worker inside your browser, and nothing is stored anywhere except this browser.

Can I use the DOM or import npm packages?

The worker has no document or window. Instead of import statements, load ES modules at runtime with await import("https://esm.sh/<package>").

Is TypeScript type-checked?

Types are stripped so the code runs instantly, but they aren't checked — use your editor or tsc for type errors.

What happens with an infinite loop?

The run is stopped automatically at the time limit (10 s by default), or when you press Stop.