ToolDashy

JS Formatter

Beautify minified or inconsistently-formatted JavaScript into clean, readable code using Prettier, with configurable indentation and semicolons.

Everything you enter is processed in your browser and isn't sent to our servers.

How to use js formatter

  1. 1Paste minified or messy JavaScript into the input box.
  2. 2Choose an indentation width and whether to add semicolons.
  3. 3Click Format.
  4. 4Copy the result or download it as a .js file.

About this tool

Formatting rewrites your code's whitespace, line breaks and indentation into a consistent, readable style without changing what it does — useful for reading minified production code, cleaning up a messy paste, or matching a team's style.

This tool uses Prettier, one of the most widely adopted code formatters in the JavaScript ecosystem, running its standalone browser build with the Babel parser — the same parsing approach used by Prettier's own editor integrations, so it handles modern syntax like arrow functions, classes, destructuring and optional chaining.

Formatting doesn't run or evaluate your code — it's purely a parse-and-reprint operation, so pasting code here never executes it.

Frequently asked questions

Yes, that's one of the most common uses — paste minified, single-line JavaScript and Prettier reprints it with proper line breaks and indentation.

Related tools