JavaScript Formatter & Beautifier
Paste JavaScript to reformat it with consistent indentation and line breaks. Minified one-liners become readable again.
Your files never leave your device — everything runs in your browser.
JavaScript — Input
Output
How to Use
- 1Paste your JavaScript into the input box.
- 2Choose 2 spaces, 4 spaces, or tabs for indentation.
- 3The formatted code appears below as you type.
- 4Copy it, or download it as a .js file.
Frequently Asked Questions
Can it un-minify production JavaScript?
It restores indentation and line breaks, which makes minified code much easier to read. Variable names that were shortened during minification can't be recovered.
Does it support modern syntax?
Yes. Arrow functions, classes, async/await, template literals and other modern JavaScript syntax are formatted correctly.
Is my code sent to a server?
No. The formatter runs entirely in your browser, so proprietary code stays on your machine.