Minify utility for HTML and CSS

To install, run:

haxelib install Minifier 0.0.3 

See using Haxelib in Haxelib documentation for more information.

Haxe HTML/CSS Minifier

Build Status Haxelib Version

This project does not aim to be the smallest but to provide just a way to minify HTML / CSS files.


Install using Haxelib:

haxelib install minifier

To use in code, add to your build hxml:

-lib minifier


  • public static function minifyHtml(content:String, keepComments:Bool = true) Minifies HTML. Assumes only textarea, pre, script, code tags contain meaningful spaces/newlines.

  • public static function minifyCss(content:String, keepComments:Bool = true)] Minify a (valid) CSS document.

  • public static function removeHtmlComments(content:String) Remove HTML comments from given content.

  • public static function removeCssComments(content:String) Remove CSS comments from given content.


The library also comes as command-line tool. At the moment this is only per file, with specific extension.

HTML/CSS Minifier

[-in] <path>    : File to process. required. Should have extension
[-out] <path>   : Project out folder. By default same as in-path
[--overwrite]   : Allows overwriting in output. By default no file
[--no-comments] : Removes comments. By default comments are kept


8 weeks ago

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser!

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github