Convertur

JavaScript minifier

Paste JavaScript to minify it with Terser: dead-code removal, variable mangling, and whitespace stripping for a much smaller file. Runs locally.

Loading tool…

What the JS minifier does

It runs your code through Terser, which removes whitespace and comments, drops unreachable code, and renames local variables to shrink the output significantly.

Why minify JavaScript

Smaller scripts download and execute faster. Minification is standard practice for shipping production JavaScript to real users.

Powered by Terser

Terser is the same industry-standard minifier used by major bundlers, so results match what a production build pipeline would produce.

How to javascript minifier

  1. Paste your JavaScript into the input pane.
  2. Click Convert to minify it with Terser.
  3. Copy the compact code or download it as a .js file.

Related converters

JavaScript Minifier — FAQ