JavaScript beautifier
Reformat minified JavaScript into a readable indented form — fully client-side.
Runs 100% in your browserHow to beautify JavaScript
- Paste minified JS. Drop in the minified or one-line JavaScript.
- Adjust indent. 2 or 4 spaces, or tabs.
- Copy or download. Grab the formatted JS.
About JS beautifying
Reading minified bundles from production for debugging, comparing two builds, or just trying to follow a one-line third-party snippet — beautifying is the universal first step. js-beautify is deterministic and runs in your browser, so even private code can be formatted without leaving the page.
Frequently asked questions
- It re-formats minified or compressed JavaScript into a readable form — adds line breaks, indents blocks, and spaces operators.
- It treats the input as JS — it formats valid TS/JSX cleanly in most cases, but does not understand TS-specific syntax (decorators, type assertions in certain positions). For TS, run Prettier locally for full fidelity.
- No. js-beautify runs locally as a lazy dynamic import.