OpenReplay Logo
12k
12k

JavaScript beautifier

Beautify and format JavaScript in your browser — fix indentation and spacing on minified or messy code, then copy. Processed locally.

Indentation
Minify instead → Processed locally

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, choose your indent size or tabs, and the formatted output updates as you type. Copy it 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.