ToolHop.

ADVERT

πŸ—œοΈ JS Minifier

Minify and compress JavaScript code instantly. Reduce file size with Terser-style compression and improve load speed.

JavaScript Minifier

Minify JavaScript code directly in your browser using Terser. Reduce file size, improve load speed, and optimize scripts before deploying.

How to use this tool

  1. Paste or type JavaScript into the editor on the left.
  2. Click Minify to run Terser in the browser and shrink the code.
  3. Copy or download the output bundle once you're satisfied with the savings.

Perfect for

  • Quickly testing minification before adding a build step.
  • Sharing reduced repro cases when filing bugs in third-party libraries.
  • Comparing bundle diffs when experimenting with new compression settings.

Optimization tips

  • Keep original source for debuggingβ€”minified code removes whitespace and renames variables.
  • Enable source maps in your production pipeline to preserve stack traces.
  • Combine with the CSS or HTML minifiers to create fully optimized static assets.

FAQ

Does minification break ES modules?
No. Terser respects module syntax, but avoid minifying code that relies on dynamic evaluation without testing.
Can I mangle top-level names?
This quick tool keeps top-level names readable. For aggressive mangling, adjust the Terser config in a dedicated build.
Is my code sent anywhere?
Everything runs locally. Your scripts never leave the browser.

ADVERT

ADVERT