🏠 Games Tutorials Dev blog JS code golf Other projects

MiniMinifier

March 2013 - December 2017

HTML & CSS minifiers in 128+ bytes, and actually much more efficient than most of the other online minifiers.

Paste HTML / CSS code in the textarea to have it instantly minified.

The Github repo also include test files and a WIP full-featured CSS minifier.


HTML minifier demo

<textarea oninput='value=value.replace(/(<!--[^]+?->|\s)+/g," ").replace(/ (?=<|$)|<\/[tl].>|<.p> *(<[p/])| ?\/?(>)/gi,"$1$2")'>

128b HTML minifier


CSS minifier demo

<textarea oninput='value=value.replace(/(\/\*[^]+?\*\/|\s)+/g," ").replace(/^ |([ ;]*)([^\w:*.#% -])([ ;]*)|\*?(:) */g,"$2$4")'>

128b CSS minifier