JavaScript Formatter
Beautify and minify JSRuns locally · nothing uploaded
Input
Output
Also works as:js minifierjs beautifierjavascript prettifyuglify js
How to use
- 1Paste JavaScript.
- 2Choose format or minify.
- 3Copy the result; syntax errors are reported.
FAQ
Which minifier is used?
Terser, the same minifier used by mainstream bundlers. It removes comments and whitespace and shortens local names.
Can formatting restore variable names?
No. Mangled names cannot be recovered; formatting only fixes indentation and line breaks.