JavaScript Formatter
Beautify minified or untidy JavaScript with clean indentation and line breaks.
Input
Paste JavaScript above, or upload a .js file.
Output
How to use JavaScript Formatter
- Paste your JavaScript or upload a file.
- Click Format JavaScript.
- Copy the result or download it.
Frequently asked questions
Can it make minified code readable?
It restores the indentation and line breaks. It cannot bring back the original variable names, which a minifier replaces with short ones.
Does formatting change what the code does?
No. Only spacing and line breaks change.
Does it work with JSON and TypeScript?
JSON formats well. Most TypeScript also formats correctly, though the tool is built for JavaScript.
Is my text uploaded to a server?
No. This tool runs entirely in your browser, so what you paste never leaves your device.