HTML Formatter

Format or minify HTML with consistent indentation and optional comment removal

HTML minifier / formatter

Format (beautify) or minify HTML in your browser. Format adds consistent indentation and line breaks. Minify removes comments and collapses whitespace to reduce size. All processing is client-side; your HTML never leaves your device.

Use cases

  • Pretty-print HTML from APIs or scrapers
  • Shrink HTML for production or email
  • Clean up pasted snippets before editing

This tool is for HTML only. For Markdown to HTML conversion, use the Markdown ⇄ HTML Converter.

Send Feedback

We'd love to hear your thoughts! Your feedback helps us improve our tools and create a better experience for everyone.

Share Your Experience

Tell us what you think about this tool

Your feedback helps us improve and create better tools for everyone