Home › Minifiers & Beautifiers › JavaScript Beautifier

JavaScript Beautifier

Take minified or tightly packed JavaScript and expand it with consistent indentation and spacing, one statement per line.

JavaScript Beautifier

How to use the JavaScript Beautifier

  1. Paste the JavaScript into the input box.
  2. Choose an indent style.
  3. Press Beautify.
  4. Copy the readable code back into your editor.

About this tool

Debugging minified code is miserable. This beautifier re-flows JavaScript from its token stream: braces get their own structure, statements go one per line, and operators get even spacing. It formats the common shape of everyday code well; deeply nested one-liners and unusual hand-rolled styles may still want a quick pass in your editor afterwards.