JavaScript Beautifier

Beautify and unminify JavaScript and TypeScript-like code online. Configurable indentation, brace style and quote handling. Runs locally.

Runs 100% in your browser. Nothing you paste is uploaded.

Input JavaScript

Output

—

About the JavaScript Formatter

Minified bundles and one-line snippets are impossible to debug. The JavaScript beautifier restores indentation, line breaks and spacing so the code becomes readable again. It also unpacks common packers such as eval(function(p,a,c,k,e,d)…).

Features

  • Beautify minified JavaScript
  • Brace style: collapse, expand or end-expand
  • Indent with spaces or tabs
  • Keep or remove blank lines
  • Unpacks common JS packers

How to use it

  1. Paste JavaScript into the input pane.
  2. Adjust indentation and brace style.
  3. Copy or download the beautified code.

Frequently asked questions

Can it restore original variable names?

No. Minifiers rename variables irreversibly. The beautifier restores formatting only; use source maps to recover original names.

Does it work with TypeScript or JSX?

Most TypeScript and JSX formats acceptably, but the beautifier does not fully understand type annotations. For TypeScript projects, Prettier is the better choice.

Esc