HTML Minifier

HTML Minifier

Remove redundant whitespace from HTML.

Try this example

Paste the sample and minify it. The result should fit on one line and retain both paragraphs.

<main>
  <p>Tea</p>
  <p>Coffee</p>
</main>

Expected result

<main><p>Tea</p><p>Coffee</p></main>

Whitespace can be significant around inline elements. Check the rendered result before deploying.

Related walkthrough · Prepare a safe test copy before using an online tool

Cookie
We care about your data and would love to use cookies to improve your experience.

Learn how we use cookies