TypeScript Compiler
Compile and run TypeScript online. Types are stripped and the result executes in a sandboxed worker.
About the TypeScript Compiler
The TypeScript Compiler type-checks your code with the official TypeScript compiler in strict mode, reports type errors with their location, then strips the types and runs the result in a sandboxed worker.
Your code runs in an isolated sandbox (a Web Worker in your browser, or a separate execution server for PHP), never on the web server itself.
How to use the TypeScript Compiler
- Write or paste TypeScript.
- Choose whether type errors should stop the run.
- Click Run: type errors are listed first, with line and column, followed by the program output.
Frequently asked questions
Does it run code with type errors?
Type errors are always listed. With "Stop on type errors" on, the program does not run; switch it off to run the type-stripped JavaScript anyway.
Which compiler options are used?
Strict mode with a modern target, matching a typical new TypeScript project.
Related tools
JavaScript Compiler
Run JavaScript online in an isolated browser sandbox. See console output, errors and execution time instantly.
Python Compiler
Run Python 3 online using a WebAssembly sandbox with the standard library. Supports stdin input.
PHP Compiler
Run PHP 8 code online. Execution happens in an isolated sandbox server, never on the web host.