ToolFeather
Developer / SEORuns in your browser

JavaScript Minifier

Trim comments and needless whitespace from JavaScript for a quick, safe size reduction.

Quick presets

JavaScript Minifier

Removes comments & whitespace safely (strings, templates and regexes untouched). No renaming.
JavaScript
Result

Runs in your browser — nothing you enter is uploaded or stored.

ToolFeather · Light minify
Scratchpad auto-saved
Stored in this browser (localStorage)

About the JavaScript Minifier

Shipping less JavaScript means faster pages. This minifier gives you a quick, safe reduction by removing what the engine doesn't need to run your code: single-line and block comments, and redundant whitespace and blank lines. It's careful to leave the contents of strings and template literals untouched, so your code keeps working.

Paste your script, minify, and see the original size, minified size, and percentage saved. Copy the compact version straight into a page or a quick experiment.

Deliberately conservative, it does not rename variables or restructure code — so there's far less risk of breakage than an aggressive optimiser. For production bundles where every byte counts, a full tool like Terser or esbuild in your build pipeline will compress further. Everything here runs locally; your code is never uploaded.

Examples

A commented function → the same function with comments and blank lines gone.
Strings like "a // b" are preserved exactly, not treated as comments.
Quick snippet for a demo → paste, minify, copy.

Frequently asked questions

4 answers
Is it safe — will my code still work?
It's conservative: it removes comments and whitespace but leaves strings, templates and identifiers intact, so the behaviour is unchanged.
Does it rename variables to save more?
No. Variable renaming and advanced compression are left to dedicated build tools like Terser, which can go much further.
Why doesn't it save as much as my bundler?
Bundlers apply aggressive transforms; this is a lightweight, low-risk minifier meant for quick use.
Is my code uploaded?
No — everything runs in your browser.