⚡

JavaScript Minifier

Compress JavaScript using Terser —the industry-standard JS minifier. Removes whitespace, mangles variable names, and eliminates dead code. Everything runs in your browser — no server, no tracking.

Developer Tools Runs locally No data sent
js minify terser compress client-side only
Options:
JavaScript Input
→
Minified JS
💡
Powered by Terser, the same engine used by webpack and Vite. Mangle names renames local variables to short identifiers for extra compression. Compress eliminates dead code, unused variables, and simplifies expressions. Typical savings: 40—0%.

What is JS Minifier?

Minify and compress JavaScript code instantly using Terser. Mangle variable names, remove dead code, and reduce file size for production. Free, browser-based, no data sent.

How to Use JS Minifier

  1. Paste the JavaScript code you want to compress.
  2. Run the minifier to generate a smaller output version.
  3. Check the result if you need to verify names, spacing, or behavior.
  4. Copy the minified script for demos, snippets, or deployment.
Understand JavaScript Minification ▾
Example
Input Input (42 bytes):
Output Minified (26 bytes): function add(a,b){return a+b}
Common Use Cases
  • Minify script snippets before deployment
  • Generate compact JavaScript for demos or embeds
  • Check whether whitespace-only compression is enough for a use case
  • Compare readable and minified output during front-end work
Frequently Asked Questions
Can minified code be reversed?

Basic whitespace minification is partially reversible with a formatter. Variable renaming is not reversible.

Does it do tree shaking or dead code elimination?

This is a whitespace/comment minifier —for tree shaking, use a bundler like webpack or Rollup.

What does JavaScript Minifier Online —Compress & Minify JS Free do?

JavaScript Minifier Online —Compress & Minify JS Free runs entirely in your browser and helps you complete this task without uploading data to a server.

Is JavaScript Minifier Online —Compress & Minify JS Free free to use?

Yes. This tool is free to use and does not require sign-up.