JavaScript Beautifier
Turn compressed or hand-written JavaScript into readable code with consistent indentation.
How it works
- 1
Paste your minified or compressed JavaScript into the input.
- 2
Choose an indent size that matches your codebase — 2 or 4 spaces are common.
- 3
The readable output appears instantly and stays completely on your device.
Questions
How does this differ from the JavaScript Formatter?
Both apply the same indentation pass. The beautifier is designed for unreadable, compressed code; the formatter is for code that just needs tidying.
Can it handle minified code with no spaces at all?
Yes. The underlying library parses the AST regardless of existing whitespace and then re-emits it with clean indentation.
Does any code get uploaded?
No. Everything runs in your browser using a bundled library — no server is involved.
More developer tools
JSON Formatter
Paste compact or messy JSON and get it back neatly indented with your chosen spacing.
JSON Minifier
Remove all whitespace and line breaks from a JSON document to shrink it as small as possible.
JSON Validator
Check whether a JSON string is well-formed, and see the exact line and column of any syntax error.
JSON Beautifier
Reformat JSON with sorted keys and readable indentation for easier reading and diffing.
JSON Tree Viewer
Explore a JSON document as an interactive collapsible tree — expand and collapse any node.
XML Formatter
Pretty-print XML with configurable indentation, preserving attributes, comments, and tag order.
XML Validator
Check XML for well-formedness and report every error with its line and column number.
YAML Formatter
Normalize and re-indent YAML, or convert it to JSON, with a configurable indent width.