Skip to main content

JavaScript & TypeScript Playground

Code runs in an isolated worker: no DOM or page access, and a 10 sec time limit. Imports are not supported.
567 B
Everything is processed in your browser. Nothing is uploaded.

About this tool: JavaScript & TypeScript Playground

Run JavaScript and TypeScript in your browser and watch the console output, with inspected objects, tables, groups and timers. Top-level await works, and TypeScript is checked with the real compiler so type errors show before you run. Code executes in an isolated worker with a time limit, keeping the page responsive.

Common uses

  • Trying a snippet without creating a project
  • Checking how a TypeScript type behaves
  • Reproducing a bug for a bug report

Frequently asked questions

Where does my code run?
In a Web Worker inside your browser. It is not sent to a server, and it cannot touch the page itself.
Why did my script stop?
Runs have a time limit so an infinite loop cannot freeze the tab. Reduce the work or break it into smaller steps.
Can I import npm packages?
Not through a package installer. The playground is meant for standard JavaScript and TypeScript running against the browser built-ins.