JavaScript Beautifier
Your code never leaves your browser — everything runs on your device.
Paste minified JavaScript and get readable, indented code back — or flip the switch and minify your own code for production. Braces, if/else chains, and function bodies are laid out on separate lines, comments are stripped in minify mode, and strings are left untouched so nothing changes meaning. This page also covers the JavaScript minifier: one tool, both directions. Free, no signup, and your code never leaves your browser.
Frequently asked questions
How do I beautify minified JavaScript?
Paste the minified code and click Beautify JavaScript. Braces open new lines, bodies are indented, and statements are split — pick 2 or 4 spaces for the indentation.
What does the minify mode do?
Minify mode strips comments and collapses whitespace, so the file is as small as possible for production. It does not rename variables or change what the code does.
Will beautifying change how my code runs?
No. Beautifying only changes whitespace and line breaks. The code behaves exactly the same after formatting.
Is my code uploaded anywhere?
No. Beautifying and minifying happen entirely in your browser. Your code is never sent to a server, stored, or shared.