⚡ Optimize

JavaScript Minifier

Compress JS safely — remove comments and extra spaces without renaming variables. Built for WordPress snippets and small custom scripts.

✅ Size before / after · ⚡ Safe minify · 📋 Copy & download · 🔒 Nothing uploaded
Safe minify: strips comments & extra spaces. Does not rename variables.
Before: 0 B After: 0 B Saved: 0 B (0%)
Input — paste your JavaScript
Output — minified result

Runs 100% in your browser — nothing is uploaded. Plugins like Autoptimize or WP Rocket may already minify site assets; use this for custom snippets, email HTML, or one-off files.

WordPress tip

How to use this on a WP site

Use for small inline scripts or custom JS you enqueue in a child theme — not as a replacement for a full bundler.

  • This tool does not rename variables (safer for WP snippets).
  • Prefer wp_enqueue_script with a .min.js file in production.
  • Test in the browser console after pasting into a snippet plugin.
FAQ

Common questions

Will this break modern JS?

It avoids aggressive transforms. Template literals and strings are preserved. Always test complex modules.

Why no uglify/rename?

Renaming breaks code that relies on global names or WordPress localize objects. Safe minify is intentional.

Is code uploaded?

No — client-side only.

Need WordPress advice?

Stuck after using this tool? Ask WP Expert AI

Our flagship assistant answers WordPress questions in plain English or full code — separate from these utilities, free beta, no login.

Try WP Expert AI →