Free online tools · Browser-first utilities · No account required
Home / Developer Tools / HTML Minifier
Developer Tools

HTML Minifier

Remove comments and compress whitespace in HTML.

Using HTML Minifier

On this page
  1. Using HTML Minifier
  2. Input reference
  3. Continue your task

Use the downloaded output only after checking it in the intended page or application. Quoted text, significant spaces and special comments can affect behavior. Keep a readable source copy for editing and treat the compact version as a separate output.

Example input

Input
<p>Hello  world</p>

Example result

<p>Hello world</p>

Read next · How to Remove Duplicate Lines Without Losing Data

Input reference

Input
Enter multiline text. Field hint — Enter or paste your input here….
Additional value (if needed)
Enter text. Field hint — Optional second value.
Report a correction

← Browse all 311 tools