Skip to content
snip tools

JavaScript beautifier

Reformat minified JavaScript into a readable indented form — fully client-side.

Runs 100% in your browser
 

How to beautify JavaScript

  1. Paste minified JS. Drop in the minified or one-line JavaScript.
  2. Adjust indent. 2 or 4 spaces, or tabs.
  3. 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

What is a JavaScript beautifier?
It re-formats minified or compressed JavaScript into a readable form — adds line breaks, indents blocks, and spaces operators.
Will it work on TypeScript or JSX?
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.
Does my code leave the browser?
No. js-beautify runs locally as a lazy dynamic import.