ToolNova

JavaScript Minifier

Reduce JavaScript file size by removing comments and extra whitespace.

This is a conservative minifier: it strips comments and whitespace but never renames variables or restructures code, so it won't achieve the same size reduction as a full build-tool minifier like Terser. It also does not attempt to distinguish regular-expression literals in every edge case.

How It Works

  1. 1Paste your JavaScript.
  2. 2It's minified automatically.
  3. 3See the size reduction and copy the result.

Features

  • String and template-literal aware comment stripping
  • Shows before/after size

Privacy

All processing happens instantly in your browser. Nothing you enter is ever sent anywhere.

Frequently Asked Questions

Aggressive minification requires fully parsing JavaScript, which risks silently breaking unusual code. This tool trades some size reduction for safety.