JavaScript Tools

JavaScript Minifier

Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.

Compact JavaScript while preserving parsed syntax. Example: minify a library file to speed up page loads.
Minify JavaScript
  1. Paste your JavaScript.
  2. Remove unnecessary spacing and ordinary comments.
  3. Copy the minified output.
Example: minify a script to ship fewer bytes.
Use to reduce file size for production.
Client-sideRuns entirely in your browser — your data never leaves your device.

Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.

JavaScript Minifier is a free JavaScript Tools utility that runs entirely in your browser — nothing you enter is uploaded.

JavaScript input
Minified JavaScript

How to use JavaScript Minifier

  1. Type or paste your text into JavaScript Minifier's input area.
  2. Watch the output update instantly while you adjust the text.
  3. When it looks right, Copy to save it.

About this tool

Parses JavaScript scripts or modules with bundled Babel 7.26.4 and generates compact code without transpilation, name mangling or execution. Strings, regular expressions, template text and statement boundaries are handled by the parser. Ordinary comments are removed; /*! notices and @license/@preserve comments remain. TypeScript, JSX and unsupported syntax are errors. Input is limited to 2 MiB of UTF-8 text. Byte totals use UTF-8; compaction is not guaranteed to make every input smaller. Source maps and exact source-text introspection are not preserved.

There is no server behind JavaScript Minifier. JavaScript Minifier is a free JavaScript Tools utility that runs in your browser, doing its work on the input you provide without a backend.

Because it runs on your device, it is fast and private and works offline once loaded. Your input never leaves the page, and no account or install is required.

Frequently asked questions

What does JavaScript Minifier do?

Compact JavaScript with a local parser, preserve string and statement boundaries, and report UTF-8 size. Invalid or unsupported syntax produces an error.

Is JavaScript Minifier free to use?

The tool is free to use. Its local parser accepts up to 2 MiB of UTF-8 input per operation.

Is my input private in JavaScript Minifier?

Yes — your input never leaves your device; JavaScript Minifier does all the work in your browser.

Does JavaScript Minifier work offline?

Once the page has loaded, JavaScript Minifier keeps working with no network connection.

Related javascript tools