How to use the HTML, CSS & JS Minifier and Beautifier
- Choose the language: CSS, JavaScript or HTML.
- Paste your code, or press Load sample.
- Press Minify to remove comments and whitespace, or Beautify to format compressed code into readable, indented lines.
- Check the size saved, then copy or download the result.
Tips
- Minifying is safe: strings, template literals and regular expressions are kept exactly as written, and variable names are not changed.
- Comments that start with
/*!(license notices) are kept. - Minify for production, but keep your readable source files: beautified code cannot bring back removed comments.
- In HTML, inline
<style>and<script>blocks are minified too, while<pre>and<textarea>content stays untouched.
Everything runs in your browser: nothing you type or paste is sent to a server.