TypeScript Beautifier
Paste compact or minified TypeScript and format it with proper indentation and consistent spacing.
Last updated: May 29, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is TypeScript Beautifier?
TypeScript Beautifier reformats TypeScript source code — including interfaces, classes, generics, enums, decorators, and async/await patterns — so it is easy to read. It uses the same brace-based formatting engine as the JavaScript Beautifier, handling C-style braces and semicolons while respecting strings and comments. It is intentionally lightweight and focuses on indentation and line breaks rather than full AST parsing.
How to Use TypeScript Beautifier
Paste TypeScript source code.
Choose indentation style.
Click Format.
Review the beautified output.
Copy or download the .ts file.
Common Use Cases
- Expanding minified TypeScript library code for debugging.
- Normalizing indentation after pasting snippets from different sources.
- Formatting compact TypeScript examples before adding to documentation.
- Tidying up generated TypeScript from build tools or code generators.
Example Input and Output
A compact TypeScript interface and class are expanded with proper indentation.
interface Config{host:string;port:number}function connect(cfg:Config):void{console.log(cfg.host)}interface Config {
host: string;
port: number
}
function connect(cfg: Config): void {
console.log(cfg.host)
}Privacy
TypeScript code is formatted locally in the browser and is not uploaded.

