TypeScript Editor
runs in your browserno sign-upfree
Edit TypeScript in a full-page editor with syntax checking and Prettier formatting.
Checking…
About this tool
This TypeScript editor gives you one large editor with syntax highlighting, folding and search for .ts and .tsx code. It checks the syntax as you type, marks the first error with its line and column, and formats code with Prettier. Under the editor you see the number of interfaces and type aliases. Everything runs in your browser.
How to use
- Paste or type TypeScript into the editor, or open a .ts file from your computer.
- Watch the status line under the editor: it shows the first syntax error with its line and column, and marks it in the code.
- Press Format to tidy the code or Minify to make it as small as possible.
- Use Full screen for more space, and fold or unfold blocks to focus on one part.
- Copy the code or download it as a .ts file.
FAQ
Does it check types?
No. It checks syntax — brackets, keywords, generics and so on — but does not run the TypeScript compiler, so type errors such as passing a string to a number are not reported.
Why is there no Minify button?
TypeScript is compiled to JavaScript before it runs, and minifying is done on that JavaScript. Use the JavaScript Editor or JavaScript Minifier for that step.
Can I undo Format or Minify?
Yes. Press Ctrl + Z (⌘ + Z on Mac) in the editor to undo it, just like a normal edit.
Are there keyboard shortcuts?
Ctrl/⌘ + Enter formats the code, Ctrl/⌘ + F opens search inside the editor, and Esc leaves full screen.
Is my code sent to a server?
No. Editing, checking, formatting and minifying all run in your browser. Your last code is only saved in this browser so it is still there when you come back. Press Clear to remove it.