Eazy SEO Tools

JS Minifier

Trim JavaScript safely — remove comments and whitespace, keep every line working.

Runs 100% in your browser — your input never leaves this page. How we handle your data →
Runs 100% in your browser — your input never leaves this page.

Safe minification only: comments and whitespace removed, logic and strings untouched.

Your results will appear here.

Fill in the input above and run the tool to get started.

Honest limits

This is a safe formatting-level minifier (comments + whitespace only). It does not rename variables, drop dead code, or optimize logic — for production bundles, use Terser or esbuild, which typically save 40–60%.

How to use the JS Minifier

  1. Paste your JavaScript into the input box.
  2. Press Minify JS — the compact output appears with byte savings.
  3. Test the output in the browser console, then copy or download it.

Examples

Example

Paste // greet function hi(n){ return 'Hi '+n; } → function hi(n){return'Hi '+n}. Same logic, smaller file.

What this tool doesn't do

  • Formatting-level only — variables are not renamed and dead code is not removed (unlike Terser/esbuild).
  • Strings, template literals, and regex bodies are preserved exactly.
  • Always test minified output before deploying to production.

Frequently asked questions

Need another tool?

Browse all 61 free tools — no signup, no paywalls.

Browse all tools