Online TypeScript Compiler
Compile and run TypeScript online with TypeScript 7.0. Press Run and tsc checks your types and compiles the file, then the program starts on Node.js 24. Type errors are shown with line numbers, and programs can read input as they run.
How to run TypeScript code online
- This page opens with TypeScript selected, so you can start typing straight away.
- Write your code in the editor, or open files from your computer: single files, or a whole project as a .zip.
- Press Run, or Ctrl+Enter. The output appears in the panel beside the editor, and when the program asks for input you type it there and press Enter.
- Share a copy with a link, or save your files to your computer.
TypeScript 7.0 on Online IDE
- Your file is checked and compiled with tsc, then the JavaScript it produces runs on Node.js 24.
- Type errors appear in the output panel with the file name and line number.
- Types for Node.js are included, so imports such as node:readline and node:fs are checked too.
- Read input with readline or process.stdin and type it in the output panel while the program runs.
Example: a TypeScript program that reads input
import * as readline from 'node:readline';
interface Rectangle {
width: number;
height: number;
}
const area = (r: Rectangle): number => r.width * r.height;
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
rl.question('Width and height: ', (line: string) => {
const [width, height] = line.split(' ').map(Number);
console.log(`Area: ${area({ width, height })}`);
rl.close();
});
Features of this tool
- Simple and fastA clean, lightweight editor that opens instantly.
- Powered by AceThe Ace code editor, with syntax highlighting, autocompletion and bracket matching.
- Interactive programsType input into the terminal while your program runs.
- Several filesWork in tabs, open files or a .zip from your computer, and save the project back to disk.
- Made for learningHelpful for beginners to learn and practice programs.
- Light and dark themesPlus 39 editor themes, a choice of coding fonts, and Vim, Emacs or VS Code keys.
- Keep your outputCopy or download the program output in one click.
- Share by linkSave your code in the cloud and open it anywhere.
Frequently asked questions
Which TypeScript version does Online IDE use?
TypeScript 7.0, compiled with tsc and run on Node.js 24, on Linux.
Where do I see type errors?
In the output panel after you press Run, each with the file name and line number. Fix them and press Run again.
Can a TypeScript program read input?
Yes. Use readline or process.stdin, then type into the output panel while the program waits and press Enter.
Can I import packages from npm?
No. Node's built-in modules work, with their types, but npm packages are not installed and programs cannot download them.
Contact us
For any feedback, queries or issues, please feel free to contact us or write to . We value your input and are committed to providing the best possible experience for our users.