PapaTools

Free CSS & JavaScript Minifier

Something not working? Report a problem

About the CSS / JS Minifier

Minify CSS or JavaScript to reduce file size — strip comments, whitespace and shorten identifiers, then copy or download the output, all in your browser with no upload.

How to use the CSS / JS Minifier

  1. 1Choose CSS or JavaScript from the toggle.
  2. 2Paste your code into the input box.
  3. 3The minified output appears instantly — see the file size reduction below.
  4. 4Click Copy to copy the minified code to your clipboard.

Frequently asked questions

What does minification do?

Minification removes comments, unnecessary whitespace and shortens internal names (for JS) to reduce file size without changing behaviour. Smaller files load faster in the browser.

Is this safe to use on production code?

The CSS minifier is a reliable regex-based stripper. The JS minifier performs structural analysis to shorten variable names — suitable for most code. For critical bundles, use your build tool (Webpack/Vite) which has better tree-shaking and source maps.

Are comments preserved?

No — all comments are stripped. If you need to preserve a licence header comment, re-add it manually after minification.

Is my code uploaded anywhere?

No. Everything runs in your browser — your code never leaves your device.

More developer tools

View all