About this TypeScript Formatter & Beautifier
This TypeScript formatter applies Prettier's formatting to interfaces, type aliases, generics, enums, decorators and TSX. It's handy when you need to clean up a snippet without opening an editor.
Features
- Prettier-powered TS formatting
- Interfaces, generics, enums, decorators
- Syntax errors reported
- Open .ts or .tsx files
How to use
- Paste TypeScript into the Input box.
- Press Beautify.
- Copy the formatted code.
Frequently asked questions
Can I minify TypeScript here?
Not directly. Compile TypeScript to JavaScript first, then use the JavaScript minifier.
Which formatter is used?
Prettier 3, the same formatter used by most TypeScript projects.
More free formatters
- BeautifyAll-in-one beautifier
- JSON Beautifier & FormatterFormat & validate JSON
- XML Beautifier & FormatterPretty print XML
- HTML Beautifier & FormatterClean up HTML markup
- CSS Beautifier & FormatterFormat CSS, SCSS & LESS
- JavaScript Beautifier & FormatterBeautify JS code
- SQL Formatter & BeautifierFormat SQL queries
- YAML Formatter & ValidatorFix YAML indentation
- Markdown FormatterTidy Markdown docs
- GraphQL FormatterFormat GraphQL queries
- Text BeautifierClean up plain text