TypeScript Formatter

Use TypeScript Formatter, review the result, and keep the original until the output is checked.

Input TypeScript
TypeScript Formatter
Formatted TypeScript
Formatted Output
Click "Format" to see formatted TypeScript here...
100% browser-side processing — your data is never uploaded to any server. · Per-tool input limit: 1 MB
100% browser-based No upload to server Free to use

Frequently Asked Questions About TypeScript Formatter

Does it type-check my code?

No. It re-indents text. Compilation and type errors still belong to tsc in your build.

Why format TypeScript?

To read generated declarations and review diffs on union types and interfaces without hunting through a single line.