JavaScript formatter

Beautify minified or messy JavaScript into readable code.

  • Development
  • 100% free & unlimited
  • No sign-up
  • Runs in your browser
JavaScript formatter

What is the javascript formatter?

The JavaScript formatter makes minified or messy JavaScript readable again: one statement per line, consistent indentation and spacing, braces on the same or a new line.

It's built on js-beautify and runs in your browser, with a code editor that highlights the syntax and marks errors.

How to use the javascript formatter

  1. 1Paste JavaScript into the editor.
  2. 2Choose the indentation and brace style.
  3. 3Press Format and copy the result.

Features

Readable code

Line breaks, indentation and spacing.

Brace styles

Same line or new line.

Code editor

Highlighting and error marks.

Private

Nothing is uploaded.

Frequently asked questions

Can it restore minified variable names?

No, minifiers rename variables permanently; formatting restores the layout only.

Does it work with JSON and TypeScript?

JSON yes. TypeScript mostly works, but type syntax may not be formatted perfectly.

Does formatting change the behavior?

No, only whitespace changes.