DEVELOPER TOOL
JavaScript Formatter & Beautifier
Beautify minified or messy JavaScript with clean, consistent indentation.
About this tool
Paste minified, compressed, or inconsistently indented JavaScript to reformat it with clean, readable 2-space indentation, consistent spacing, and line breaks — the opposite of the JS Minifier. Uses Terser's beautify output mode, running entirely in your browser.
Nothing is uploaded — your source code is reformatted locally and never leaves your device.
Frequently asked questions
- Does this change what my code does?
- No — only whitespace, indentation, and (optionally) semicolon insertion change. No variables are renamed and no logic is altered, since compression and mangling are both turned off.
- Can this un-minify variable names back to what they originally were?
- No — once code is minified, the original variable names are gone for good (unless a source map was kept). This tool restores readable structure and indentation, not the original naming.
- What happens with invalid JavaScript?
- Formatting fails and a hint explains that the source has a syntax error — check for a missing bracket, quote, or semicolon near where the error points.