JavaScript Beautifier

Make minified or badly indented JavaScript readable. Modern syntax, JSX and modules are supported.

Input · drop a file

Output

Beautify vs. format

The same thing: both re-print code with consistent indentation and line breaks. This page uses Prettier with the options you choose — semicolons, single or double quotes, print width.

Unminifying code

Beautifying minified code restores the structure, but not the original names: if a minifier renamed tickets to t, it stays t. Short-circuit tricks like !0 for true are also kept. That is usually enough to follow what a script does.

Questions

Does it support TypeScript?

Use the TypeScript formatter, which uses Prettier’s TypeScript parser.

Is my code uploaded?

No. Prettier runs inside the page.

Related tools