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
- Paste minified or messy JS.
- Choose 2 spaces, 4 spaces or tabs.
- 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