JavaScript Formatter/Minifier

JavaScript formatter powered by the Prettier engine for consistent indentation and style, plus a minifier that strips whitespace and comments. Free and instant in your browser, no upload, no install.

Click the run button.
Embed

Embed this tool on your site

Powered by Patrache Studio DevTools
Last updated: 2026 · Free online tool

What is JavaScript Formatter/Minifier?

JavaScript formatter powered by the Prettier engine for consistent indentation and style, plus a minifier that strips whitespace and comments. Free and instant in your browser, no upload, no install.

How to Use

  1. 1
    Enter JavaScript— Paste your JavaScript code on the left.
  2. 2
    Select mode— Choose format or minify mode.
  3. 3
    Execute— Click the execute button and the result will be displayed.

Related Tools

Frequently Asked Questions

Currently only JavaScript (ES2024) is supported. TypeScript support is planned for a future update.

Indentation size can be selected, and singleQuote and trailingComma are applied by default.

Yes, modern syntax including import/export, dynamic import, and top-level await are supported.

No. Prettier standalone runs directly in the browser.

Yes, the Babel parser automatically handles JSX syntax.

This site uses cookies for better experience and advertising. Learn more

Please allow ads on this site

To use these tools, allow ads on this site. Advertising keeps this service free.

Open your ad blocker, turn off blocking for this site, then check again.