JavaScript Minifier: Minify JS Code Online
Paste your JavaScript, click once and get a smaller file that does exactly the same thing. Strips comments, spaces and line breaks. Free, instant, no signup.
Smaller JavaScript, Faster Pages
Every comment, space and line break in your JavaScript gets downloaded by every visitor. On a big script, that adds up to real seconds on a slow mobile connection. This JavaScript minifier strips the extras out so your files are lighter, your pages load quicker and Core Web Vitals look a little better.
Read moreMinify JS in One Click
Paste your code and click Minify JS. Comments, indentation and blank lines are removed and the result appears instantly, along with how much space you saved. Copy it or download it as a .min.js file.
Why Minified JavaScript Loads Faster
Smaller files download and parse faster, especially on phones. Minified JavaScript combined with Gzip or Brotli on your server can cut transfer size a lot. Google’s PageSpeed Insights even flags unminified JS as an easy win. Run a JavaScript minify step before every deploy and you’ll rarely see that warning.
Shorter Names, Same Behaviour
Turn on name shortening and local variables like userAccountBalance become a or b. The JS minifier only renames things that are safe to rename, so global names and object properties your other code relies on stay untouched.
JavaScript Minify Online or in Your Build
Big projects usually minify with Terser, esbuild or a bundler like Vite. But for a WordPress snippet, a landing page script or a quick fix, it’s faster to minify JS online here. No setup, no node_modules folder. A quick JS minify online pass is often all a small script needs.
Keep License Comments if You Need To
Many open-source libraries ask you to keep their licence notice. Comments starting with /*! can be preserved while everything else is stripped, so you stay compliant while still minifying JavaScript properly.
Need to Un-Minify JS Later?
Minified code isn’t meant to be edited. Keep your original file for that. If all you have is the minified version, paste it into our JavaScript Beautifier to unminify it and restore readable formatting.
How to Minify JavaScript
Paste your JavaScript
Pick your options
Click Minify JS
Copy or download
JavaScript Minifier FAQs
Common questions about minifying JS code.
What does it mean to minify JS?
How to minify JavaScript?
How much smaller will my file get?
Does minifying JavaScript change how it works?
What’s the difference between minify.js and .min.js?
Should I minify JS if my server uses Gzip?
Can I un minify JS?
Is this JavaScript minifier free?
JS minified? Shrink the rest of your page.
Compress your stylesheets with our CSS Minifier, and trim your markup with the HTML Minifier.
CSS MinifierRaheel Jakhura
CEO / Co-Founder
Our goal is to provide online free tools so you don't have to install any software for basic usages. We are trying to add more tools and make these tools free forever.