Skip to content
Takikit

HTML Minifier

Remove comments and extra whitespace between tags while keeping the content of pre, textarea and script intact.

Loading tool...

Runs in your browser. Nothing is sent anywhere.

When to use it

Use this when pasting HTML into a custom code box in WordPress, Blogger, an email template or a static page and you want it compact and lighter to load.

CSS inside style tags is minified too, and conditional comments like <!--[if mso]> for Outlook are kept. Note that spaces between tags such as </b> <i> are removed as well, so check for words that may run together.

How to use

  1. Paste HTML.
  2. Choose whether to keep or remove comments.
  3. Click Copy or Download.

Frequently asked questions

Is the data I paste sent to a server?

No. The tool runs in JavaScript right in your browser, and Takikit has no server that receives data. You can turn off your internet after opening the page and the tool will still work.

Does reformatting change how the code runs?

No. The tool only rearranges whitespace, line breaks and indentation. The minified version also removes comments and extra whitespace, but keeps the content inside strings unchanged.

Related tools

More Developer tools

See all developer tools