JavaScript Formatter

Beautify minified or messy JavaScript with clean indentation and spacing.

How to use JavaScript Formatter

  1. Paste your JavaScript into the input box.
  2. Choose the indent size.
  3. Click Format, then copy or download the result.

Features

  • Works on minified code
  • Adjustable indentation
  • Copy and download buttons

Supported formats and limitations

Formats the code but cannot restore original variable names from minified code. It does not run or validate your JavaScript.

Frequently asked questions

Does it run my code?

No. The code is only reformatted as text and is never executed.

Can it restore minified variable names?

No. Short names such as a and b stay as they are.

Privacy: this tool runs in your browser. Nothing you add is uploaded to our servers.

Related tools