Skip to content

HTML, CSS & JS Minifier and Beautifier Online

Minify or beautify HTML, CSS and JavaScript in your browser. Safely removes comments and whitespace, shows the size saved and turns messy code into clean lines.

How to use the HTML, CSS & JS Minifier and Beautifier

  1. Choose the language: CSS, JavaScript or HTML.
  2. Paste your code, or press Load sample.
  3. Press Minify to remove comments and whitespace, or Beautify to format compressed code into readable, indented lines.
  4. 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.

More developer tools