Developer Tools
Live

JavaScript Minifier

Minify JavaScript by removing whitespace and comments.

Minify JavaScript by removing whitespace and comments.

Accepts:JSOutputs:JS
Quick start: Paste your JavaScript source code into the input area. → Optionally toggle name mangling to shorten variable and function names for even smaller output. → Click 'Minify' to remove whitespace, comments, and optionally mangle identifiers.

Supported formats

Input formats
JS
Output formats
JS

How to use JavaScript Minifier

  1. 1

    Paste your JavaScript source code into the input area.

  2. 2

    Optionally toggle name mangling to shorten variable and function names for even smaller output.

  3. 3

    Click 'Minify' to remove whitespace, comments, and optionally mangle identifiers.

  4. 4

    Review the minified output and the size reduction percentage.

  5. 5

    Copy the compressed JavaScript with one click.

Popular tools

Try our most-used tools

Why use JavaScript Minifier?

  • Removes whitespace, comments, and unnecessary syntax for the smallest possible JavaScript output.
  • Optional variable name mangling shortens identifiers for additional size savings.
  • Shows original and minified sizes with percentage reduction for clear impact measurement.
  • Runs entirely in your browser — no source code is sent to any server.

Common use cases

  • Compress JavaScript before deploying to production when a build pipeline is not available.
  • Minify inline scripts for landing pages and email templates.
  • Shrink third-party scripts that were provided in unminified format.
  • Quick-compress utility scripts for embedding in HTML pages.

Limitations & things to know

  • Does not mangle variable names by default (optional toggle)
  • ES module syntax is supported but dynamic imports may not minify fully

About JavaScript Minifier

JavaScript file size directly impacts page load performance, and minification is one of the most effective ways to reduce it. Xevon Tools' JavaScript Minifier strips whitespace, comments, and unnecessary syntax from your source code, with an optional name-mangling pass that shortens variable names for even greater savings. Typical reductions are 30-60% from whitespace removal alone, and 50-70% with mangling enabled. The tool supports ES6+ syntax including arrow functions, template literals, async/await, and modules. Original and minified sizes are displayed alongside the percentage reduction so you can measure the impact. This is ideal for quick production optimization when a full build pipeline is not available, for inline scripts in landing pages, and for third-party code that was not provided minified. Everything runs in your browser, keeping your source code private.

Frequently asked questions

Name mangling is optional and disabled by default. When enabled, local variable and function names are shortened to single characters, producing significantly smaller output. Global names are not mangled to avoid breaking external references.
Yes. The minifier handles modern JavaScript features including arrow functions, template literals, destructuring, async/await, and ES modules.
Typical savings are 30-60% with whitespace removal alone. Enabling name mangling can increase savings to 50-70% depending on the code structure.
Yes. Use the companion JavaScript Beautifier to expand minified code into readable, properly indented format for debugging and code review.

Your files never leave your device

Every tool on Xevon Tools runs 100% in your browser. No uploads, no servers, no tracking. Free forever.

Learn more

Embed JavaScript Minifier on your site

Add this tool to your own website, blog, or internal tool page with one line of code. Free to use, no attribution required (but appreciated).

<iframe src="https://www.xevontools.com/embed/minify-js" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px;" title="JavaScript Minifier — Xevon Tools"></iframe>
Share: