Performance

JS Minifier

Paste your JavaScript to minify it (strip comments and whitespace) — or switch to Unminify to beautify minified JS back into readable, indented code.

We strip comments and collapse whitespace to shrink your file.

What is a JS minifier?

A JS minifier strips comments and collapses whitespace in JavaScript so the file is smaller and downloads faster — without changing what it does. This JavaScript minifier works online and instantly, no signup, and shows how many bytes you saved.

Minify or unminify JavaScript

Use Minify for production (smaller files, faster load) and Unminify to unminify js — re-indenting minified code back into readable form. The built-in javascript beautifiermakes it easy to debug or read a minified file you didn't write.

Why JS minification matters

Smaller JavaScript downloads and parses faster, which improves page speed and Core Web Vitals. JavaScript minification is one of the simplest performance wins — run it on inline snippets and small scripts before you ship.

How to use the JS minifier

  1. Pick Minify or Unminify.
  2. Paste your JavaScript.
  3. Click the button and copy the result.

More performance tools

Pair this with our CSS Minifier, HTML Minifier, Page Speed Test and the full free SEO tools suite.

Frequently asked questions

A JS minifier removes comments and unnecessary whitespace from JavaScript so the file downloads faster, without changing what the code does. Paste your code and this JavaScript minifier returns a smaller, production-ready version plus how many bytes you saved.
Switch to the Unminify tab, paste your minified JavaScript, and run it. We re-indent the code and add line breaks so it's readable again — useful for debugging or understanding a minified file. It's a JavaScript beautifier built into the same tool.
No. Minification only strips comments and whitespace, so the runtime behavior is identical for typical code. For aggressive optimization (variable mangling, dead-code elimination) use a build-step tool like Terser; this online JS minifier focuses on safe, instant wins.
Smaller JS files download and parse faster, improving page speed and Core Web Vitals. Minifying your scripts is one of the simplest performance wins, especially for inline snippets and small libraries.
Completely free and online, with no account required. Both minify and unminify are included. It's part of WebsiteAuditTools' free suite of performance tools.