Skip to content
DDevToolery

TypeScript Formatter

Format TypeScript and TSX with the correct parser.

Loading tool…

About this tool

Formats TypeScript by parsing it into a syntax tree and printing it back. Types are parsed but not checked — this is a formatter, not a compiler.

Limitations

  • Formatting only. There is no type checking here — that needs the whole program, not one file.

Questions

Will it catch type errors?
No. It will catch syntax errors, because a tree cannot be built from invalid source, but semantic type checking is a separate step.

Privacy

This page does its work in your browser. What you paste is processed by JavaScript running on your own device and is never sent to a DevToolery server — there is no server that could receive it. The page itself is a static file delivered by a CDN. See exactly what is stored.