Hire me

JavaScript Beautifier

Make minified JavaScript readable again with proper indentation and line breaks.

  • Free, no sign-up
  • Code stays in your browser
  • Works on phone and desktop

The beautifier (js-beautify) re-formats minified or messy JavaScript and JSON with consistent indentation and spacing so you can read and debug it.

How to format JS

  1. Paste minified or messy JS.
  2. Choose 2 spaces, 4 spaces or tabs.
  3. Copy or download the formatted code.

Limitations

Beautifying restores layout, not original names: mangled variables such as a and b stay short.

Frequently asked questions

Does it work with JSON?

Yes, though the JSON Formatter also validates JSON.

Updated October 2026 · Built and tested by Sharjeel Tahir · How our tools are tested