JavaScript beautifier
Format minified or messy JavaScript and JSON-like code.
About this tool
This tool reformats JavaScript with consistent indentation, spacing and line breaks, which makes minified bundles and one-line snippets readable. You can choose 2 spaces, 4 spaces or tabs, and whether opening braces stay on the same line or move to the next.
At a glance
- What it does
- Format minified or messy JavaScript and JSON-like code.
- Price
- Free, no sign-up
- Works in
- Your browser, on phone or computer. Works offline after the first visit.
- Privacy
- What you type never leaves your device.
How to beautify JavaScript
- Paste your JavaScript or open a .js file.
- Pick the indent and brace style.
- Copy the formatted code or download it.
Private
Your text stays in your browser and is never sent to a server.
Instant
Results update as you type, with nothing to install.
Free
No sign-up, no limits and no ads inside your writing space.
Frequently asked questions
Can it restore the original variable names of minified code?
No. Minifiers rename variables to short names like a and b, and that information is gone. Beautifying restores the layout, not the names.
Does it check my code for errors?
No. It formats code without running or validating it, so broken code is formatted as well as it can be. Use your editor or linter to find syntax errors.
Is my code run or uploaded?
No. The code is only treated as text and formatted in your browser. It is never executed and never leaves your device.



