Yuzool

Dev Tools

Minifier for HTML, CSS and JavaScript

Paste HTML, CSS or JavaScript to make it as small as it safely goes, and see how many bytes you saved, before and after gzip.

What minifying removes

Comments, line breaks and spaces that aren’t needed, and in JavaScript also long local names and dead code. A small example, minified by this page’s CSS rules: "a { color : red ; margin: 0px 0.5em ; }" becomes "a{color:red;margin:0 .5em}".

Is it worth it with gzip?

Servers usually compress files with gzip or Brotli anyway, which removes much of what minifying would. Minifying still helps: the page shows both sizes so you can see the real saving for your file.

How to use it

  1. Paste the code (the language is detected).
  2. Copy or download the minified result.
  3. Test it before shipping, as with any build step.

Questions

Is it safe for my HTML?

The HTML rules keep <pre>, <textarea>, <script> and strings as they are and only collapse spaces between tags. Inline styles are minified with the CSS rules.

Which JavaScript minifier is it?

Terser 5, the minifier used by most JavaScript build tools, loaded only when you minify JavaScript.

Related tools

Open all 35 Dev Tools. Everything runs in your browser; nothing you paste is uploaded.

Settings

History

Snippet