Online TypeScript compiler
Compile and run TypeScript online free, no sign-up: tsc compiles your code, Node.js runs it, and you see the output, errors and run time instantly.
How do I run TypeScript code online?
This is an online TypeScript compiler: write TypeScript in the editor, put its input in the Input box and press Run. The code is compiled with tsc and the result is run on Node.js, so you see type errors from the compiler and the program's own output and run time — free, with no sign-up.
How it works
- Write your program. A TypeScript program is a script, compiled with tsc and its default settings — target ES5, strict mode off — and then run by Node.js. Type annotations, interfaces, enums and generics all work; there is no browser, so print with console.log.
- Give it input. Read standard input with Node's fs module — require("fs").readFileSync(0, "utf8") — and split it into lines or words. Node's type definitions are installed, so require, process and the fs functions are typed. Put every line the program reads in the Input box before you run it.
- Run it. Press Run or Ctrl+Enter. You get what the program printed, any compiler or runtime error, and how long it ran. The first run without an account asks a quick check that you are a person.
Who it is for
Anyone writing TypeScript who wants it run now: a student checking a lab program or an exam answer, someone on a machine where nothing can be installed, or a learner trying TypeScript before setting it up.