JS Beautifier
Production JavaScript is minified into a single line with short names, which is exactly what you want for delivery and exactly what you do not want when reading it. Reformatting restores the line breaks and indentation.
It will not undo the minifier's renaming — that information is gone — but structure alone makes a bundle far easier to follow.
Runs in your browser. JS Beautifier processes your input on your own device. Nothing you enter or upload is sent to a server.
How to use the JS Beautifier
- Paste your JavaScript into the input area.
- Run the formatter.
- Copy the readable output.
Frequently asked questions
Can it recover the original variable names?
No. Minifiers replace descriptive names with short ones and the originals are not stored in the output. Only a source map can restore them, and that has to be published alongside the bundle.
Does formatting change what the code does?
It changes whitespace, which JavaScript is generally insensitive to. The one thing to watch is automatic semicolon insertion in code that omits semicolons — test any reformatted code before relying on it.
Is my code uploaded?
No. It is processed in your browser.