Skip to content
DevKOM

HTML Formatter

Clean up HTML from templates, emails or dev tools with readable indentation, or shrink it for production. A quick structure check warns about tags that are not closed or are closed in the wrong order.

Mode
Indentation
The HTML is treated as text only: nothing is rendered or executed.
Formatted HTML

How to format HTML

  1. Paste your HTML into the input.
  2. Choose Format (with indentation and wrap width) or Minify.
  3. Review any structure warnings shown under the input.
  4. Copy or download the formatted HTML.

Frequently asked questions

Is the HTML executed or rendered?

No. The markup is treated as text only. Scripts never run and no resources referenced by the HTML are loaded.

What does the minifier remove?

Comments (except conditional comments) and whitespace between tags. Content inside <pre>, <textarea>, <script> and <style> is left untouched so it keeps working.

More in Code & Data.