Skip to content

Online TypeScript Compiler

Write TypeScript with interfaces, generics and classes and run it straight away. See console output and errors in your browser.

Private · on device. Runs in your browser: your file is not uploaded. No sign-up.

main.ts
Output

Press Run (or Ctrl+Enter) to see the output here.

How to use an online TypeScript compiler

  1. Write TypeScript in the editor, or pick an example.
  2. Press Run (or Ctrl+Enter).
  3. The types are removed and the code runs as JavaScript; the output shows on the right.

Learning to code? The free courses in the Learn section go from beginner to expert, with tasks checked in this same editor. Other languages: all languages, Python, JavaScript, SQL, HTML, CSS & JS.

Frequently asked questions

Does it check types?

It removes the types and runs the code, like a fast build tool, so it does not stop on a type mistake. Your editor at home (VS Code) shows type errors as you type.

Which TypeScript features work?

Interfaces, types, generics, enums, classes with private and readonly fields, and the rest of modern TypeScript syntax.

Is my code uploaded?

No. It is turned into JavaScript and run inside your browser.