HTML / CSS / JS Minifier

With this tool, you can quickly minify your codes by removing all extra white spaces, newlines, and comments to optimize website speed. (bookmark for quick reuse)

HTML, CSS, JavaScript minifier is a free online tool specially designed for you guys (web developers) to minify and reduce the size of your HTML, CSS, or JavaScript codes online. It is a good practice to minify your HTML, CSS, and JavaScript files before putting them up on production servers.

Minification helps boost the speed of websites and web apps and provides a level of abstraction to your codes as they look ugly and difficult to understand.

You must keep the minified files in the .min extension so you can edit the non minified file easily during code changes and then minify them again using this tool.

It is recommended to bookmark it on your web browser to revisit it quickly when needed for better productivity.

Please share these tools with your friends and colleagues. Also, it will be great if you can recommend these tools in your blogs if you have one. Thank You :-)

Follow these simple steps to get the best results with this tool.

  • Step 1 - Copy your HTML, CSS, or JavaScript code from your file and paste it to the tool's text area.
  • Step 2 - Press the blue-colored button labeled as "Minify Code", and you will see the success message showing 'Original Size', 'Minified size', and 'Saving percentage' below the text area.
  • Step 3 - Select all minified code back to your original HTML, CSS, or JavaScript file.
  • Step 4 - Press the 'Reset' button in grey color if you want to use it again to minify more than one file.

Now, save this tool or bookmark it on your web browser to revisit it quickly when needed. Thank you!

Select: All, None, Reset
  • Treat attributes in case sensitive manner (useful for custom HTML tags)
  • Omit attribute values from boolean attributes
  • Don't leave any spaces between display:inline; elements when collapsing. Must be used in conjunction with collapseWhitespace=true
  • Collapse white space that contributes to text nodes in a document tree
  • Always collapse to 1 space (never remove it entirely). Must be used in conjunction with collapseWhitespace=true
  • Use direct Unicode characters whenever possible
  • Parse input according to HTML5 specifications
  • Insert tags generated by HTML parser
  • Keep the trailing slash on singleton elements
  • Specify a maximum line length. Compressed output will be split by newlines at valid HTML split-points
  • Minify CSS in style elements and style attributes (uses clean-css)
  • Minify JavaScript in script elements and event attributes (uses UglifyJS)
  • Minify URLs in various attributes (uses relateurl)
  • Always collapse to 1 line break (never remove it entirely) when whitespace between tags include a line break. Must be used in conjunction with collapseWhitespace=true
  • Prevents the escaping of the values of attributes
  • Process contents of conditional comments through minifier
  • Comma-delimited string corresponding to types of script elements to process through minifier (e.g. text/ng-template, text/x-handlebars-template)
  • Type of quote to use for attribute values (' or ")
  • Remove quotes around attributes when possible
  • Strip HTML comments
  • Remove all attributes with whitespace-only values
  • Remove all elements with empty contents
  • Remove attributes when value matches default.
  • Remove type="text/javascript" from script tags. Other type attribute values are left intact
  • Remove type="text/css" from style and link tags. Other type attribute values are left intact
  • Remove space between attributes whenever possible. Note that this will result in invalid HTML!
  • Sort attributes by frequency
  • Sort style classes by frequency
  • Trim white space around ignoreCustomFragments.
  • Replaces the doctype with the short (HTML5) doctype

webdevpuneet.com © 2021 | hosted by Bluehost (web hosting)