JavaScript Beautifier
Re-indent JavaScript with your choice of braces and indentation.
About the JavaScript Beautifier
Turn minified or messy JavaScript into readable code: choose 2, 3, or 4 spaces or tabs, and collapsed, expanded, or expanded-with-new-line brace styles.
Frequently asked questions
Will it break my code?
The beautifier only re-indents and normalises whitespace; strings, comments and semantics are preserved.
Does it handle ES2020+ syntax?
Yes — modern syntax including optional chaining, nullish coalescing, and template literals is supported.