99+ Free Tools
← Back ✕ Close

JavaScript Minifier

Paste JavaScript and shrink it by removing comments, extra spaces and line breaks.

Printed pages of program code on a desk
Strings and regular expressions are kept exactly as written.

JavaScript

Minified

Paste JavaScript to minify it.

How this tool works

Method. Comments are removed and spaces are kept only where the code needs them. Text inside quotes and regular expressions is never changed. The code is checked first, and invalid JavaScript is refused with its error.

Privacy. Everything happens in your browser. Nothing is uploaded or shared; the recent-minifications record stays on this device only.

Limits. Code up to 1 MB. Variable names are not renamed, so the minified code stays readable enough to debug.