JavaScript Beautifier
Beautify and indent JavaScript code.
100% Private — Nothing is Uploaded
All processing happens locally in your browser. Your files never leave your device and are never sent to any server.
Other languages
About the JavaScript Beautifier
This tool reformats JavaScript so it is easy to read. It uses a tokenizer that respects strings, template literals, regex literals, and comments, so your code will not break.
What it does
- Adds newlines after
{,}, and;. - Indents nested blocks.
- Preserves strings, template literals, regex, and comments.