Skip to content
Ovatly

JavaScript Formatter

100% PrivateDeveloper Tools

Beautify compressed or messy JavaScript into consistently indented, readable code.

Runs entirely in your browser. Your input is not uploaded to Ovatly or anywhere else.

  1. 1Paste your JavaScript into the input box.
  2. 2Choose an indent size of 2 or 4 spaces.
  3. 3Press Format JavaScript.
  4. 4Copy or download the formatted code.

About this tool

The JavaScript Formatter beautifies compressed or messy JS into consistently indented code, one statement per line. It is what you use on a minified bundle snippet, a copied code sample, or a colleague's everything-on-one-line script before you try to read it.

Related tools

Advertisement

Part of Ovatly's free tools in Developer Tools.