Paste JavaScript, drop a file, or
About this tool
A JavaScript beautifier reformats code with consistent indentation, spacing and line breaks. It's especially useful for reading minified or one-line JavaScript: paste hard-to-follow code and get back something you can actually read.
Paste JS, hit Beautify, and copy the result with one click — or switch to the JavaScript minifier to compress it again. Everything runs in your browser.
Formatting happens locally — your code never leaves your browser.
Frequently asked questions
Can it un-minify minified JavaScript?
It re-indents and re-spaces minified code so it's readable, but it can't recover the original variable names a minifier mangled — those are gone. The logic is unchanged.
Does beautifying change behaviour?
No — it only adds whitespace and line breaks. The parsed program is identical.
How do I minify instead?
Use the JavaScript minifier (linked below), powered by Terser.