Has anyone successfully minified Craft's HTML templates?

Had setup a Grunt task but it had parse issues with the twig template tags. I since found that the Grunt task "HTMLmin" is only for the purposes of minifying "vanilla" HTML.

Is this even possible?

Any help or direction is greatly appreciated.

2 Answers 2


Here's a plugin I made that does just that:



There are several plugins that will minify/compress CSS/JS for you.

But for HTML, maybe you're better off just enabling gzip compression on your web server for all output.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.