JavaScript beautifier & formatter
Paste JavaScript to reindent it with consistent style, spacing, and line breaks using Prettier's Babel parser — all in your browser.
Loading tool…
What the JS beautifier does
It parses your code with Prettier's Babel parser and reprints it with consistent indentation, quotes, and spacing so minified or tangled code becomes readable.
Why beautify JavaScript
Reading minified bundles or inconsistent code is slow and error-prone. Beautifying restores structure so you can understand and debug it.
Modern syntax support
It understands modern ES syntax and JSX, so arrow functions, template literals, and destructuring all format correctly.
How to javascript beautifier
- Paste your JavaScript into the input pane.
- Click Convert to beautify it.
- Copy the formatted code or download it as a .js file.