JS / TS Formatter
Free online JavaScript and TypeScript formatter powered by Prettier, with JSX/TSX support and reverse minify — local.
Privacy: all processing happens locally in your browser. Your input never leaves your device.
What is JS / TS Formatter?
This tool embeds the Prettier engine (the same one behind VS Code formatting) to beautify JavaScript/TypeScript code online: consistent indentation, quotes, semicolons and line breaks, with JSX/TSX support. Pasting a minified third-party script here and formatting it is the first step to reading it. Reverse minification (stripping comments and extra whitespace) is supported too. Everything is processed locally.
How to Use
- Paste JS/TS code
- It formats automatically (or click Minify)
- Copy the result
FAQ
- Which formatting rules are used?
- Prettier defaults: 2-space indent, double quotes and trailing semicolons — consistent with most team style guides.
- Can it restore obfuscated variable names?
- No. Formatting only restores layout; recovering variable names needs a deobfuscator, with limited effect.
Related Tools
CSS FormatterFree online CSS formatter based on Prettier: restore single-line stylesheets to readable indented CSS, or minify.HTML FormatterFree online HTML formatter based on Prettier: re-indent tags, normalize attributes, format embedded script and style.SQL FormatterFree online SQL formatter for MySQL, PostgreSQL, SQL Server and SQLite: uppercase keywords and indented subqueries.XML FormatterFree online XML formatter with two-space indent, preserved attributes, comments and CDATA, plus line-numbered errors.
Last updated 2026-09-04