Useful Hacks

JavaScript Minifier

Compress JavaScript with real minification, not just whitespace removal.

Processed locally in your browser. Nothing you enter is uploaded or stored.
  • Real minification via Terser: variable renaming and dead-code elimination, not just whitespace stripping.
  • The same engine used by webpack, Rollup and Vite for production builds.
  • Runs in your browser; code isn't uploaded.

Why this is private

  • Processed locally in your browser. Nothing you enter is uploaded or stored.
  • Open your browser's DevTools → Network tab while using this tool — you won't see a request carrying your input, because it never leaves your device.
  • Nothing you enter is uploaded to a server or shared with us — the processing happens entirely on your device.

Overview

Minifies JavaScript using Terser — the same production-grade minifier used by major bundlers — which renames local variables, drops dead code and strips whitespace/comments, not just whitespace removal.

How to use it

  1. 1Paste JavaScript code.
  2. 2The minified output updates automatically.
  3. 3Copy it or download as .js.

Tips

  • This is real minification (renaming, dead-code removal), not just whitespace stripping — the output can look substantially different from the input while behaving identically.

Frequently asked questions

What people use it for

Shrink a standalone script before deploying itCompress a hand-written script that isn't going through a bundler.
Compress a code snippet for a size-limited contextFit a script into a bookmarklet, a URL, or a platform with a character limit.
See how much smaller minification makes your codeCheck the real savings before deciding whether to add a build step.

Related guides

Related tools

All developer tools

Ready to use JavaScript Minifier?

JavaScript Minifier

Search tools

Search for any tool by name, category or keyword