Compress HTML

This online HTML compression tool will save space in your HTML files and make them much smaller by doing the following:

  • Removing text line breaks from the code
  • Removing tab spaces
  • Replacing double spaces with single spaces

There is also the option to not compress the head of the HTML document.

If you have javascript code written directly in the HTML head then leaving it not compressed is probably best as compression could stop the javascript from working properly.

Using this tool or similar can result in a nice reduction in html file size. It's especially a good practice to compress html if you run a website or service that requires a lot of bandwidth.

I also have a tool for uncompressing html. It's pretty simple, it won't restore the indented tab structure of the html but it will once again become at least readable.

This free compressor can now compress an entire html web page or just a chuck of HTML code if you prefer.

Compressed HTML for your Web Server

Having compressed HTML files online will save you a lot of money on your server bills if you have a very bandwidth heavy website. It's one of the easiest ways to optimize a website so start compressing...

HTML Compression Tool

Paste your html code in the box below and then click the button.

The new compressed html will appear at the bottom of the page.

Don't compress HTML head of document

New Compressed HTML

Copy your new smaller html code from the box below.

Share this page!   

Other Tools on this Website