About this JavaScript, CSS and HTML minifier
Minify JavaScript, CSS and HTML to reduce page weight and speed up loading, or beautify minified code to make it readable again. JavaScript is minified with Terser (the minifier used by most bundlers), CSS comments and whitespace are removed, and HTML is collapsed while preserving <pre>, <textarea> and <script> contents.
How to use the JS, CSS and HTML Minifier and Beautifier
- Choose JavaScript, CSS or HTML.
- Paste your code.
- Click Minify or Beautify and copy the result.
Frequently asked questions
Is minified JavaScript safe to use?
Yes. Terser only renames local variables and removes dead code and whitespace, so behavior stays the same.
Does it keep license comments?
CSS comments starting with /*! are preserved.
Is my data safe?
Yes. The tool runs entirely in your browser using WebAssembly. Nothing you type or upload is sent to a server, logged or stored.
Is it free?
Yes, completely free with no sign-up, no limits and no watermarks. It also works offline once the page has loaded.