Make minified JavaScript readable
Production JavaScript is squeezed onto a handful of lines. Paste it here and the beautifier restores indentation, line breaks and spacing, so functions, conditions and loops are laid out clearly. It understands modern syntax: arrow functions, classes, template literals, async/await, optional chaining and modules.
The code is also run through a syntax check, so a missing bracket or stray character is reported before you waste time on it. Choose your indent size and brace style, then copy or download the result.
How to beautify JavaScript
- 1
Paste the code
Minified or just messy.
- 2
Set the options
Indent size and brace style.
- 3
Check the syntax result
Errors are reported with a location.
- 4
Copy or download
Save as a .js file.
Key features
Modern JavaScript
ES modules, classes, async/await and more.
Syntax check
Catches errors before you run the code.
Configurable style
Indentation and brace placement.
Private
Code never leaves your browser.
Common uses
- Debugging production bugs: Read the minified bundle a browser actually loaded.
- Auditing third-party scripts: See what an embedded widget or tag really does.
- Cleaning up snippets: Format code copied from chats and forums.
Tips and good to know
- Variable names shortened by a minifier (like
aort) can't be restored. Source maps are the only way to recover the originals. - To shrink code for production, use the JS Minifier.
