Text & Docs

HTML Formatter & Minifier

Format or conservatively minify HTML documents and fragments locally. Choose indentation, compare UTF-8 sizes, copy and download. No source execution or uploads.

About this tool

Beautify HTML documents and fragments with readable indentation, or conservatively minify whitespace and ordinary comments. Compare UTF-8 byte counts and size changes, then copy or download .html output.

Best use cases

  • Read minified page source and tidy HTML examples for static pages or documentation.
  • Reduce HTML while retaining inline text separation and preformatted content.

How to use it

  1. Paste a standard HTML document or fragment and choose 2/4 spaces or Tab indentation.
  2. Select Format or Minify, then inspect the output and size change. Each run supports 200,000 characters and can be cancelled.
  3. Check meaningful text spacing, then copy or download .html output. Source is never executed and external resources are not loaded.

FAQ

Are embedded JavaScript and CSS also minified?

Minification retains code inside script/style elements without optimizing it. Formatting uses default HTML display rules. There is no execution preview.

How is text whitespace handled?

Conservative minification collapses ordinary whitespace to one space, retaining inline text separation, pre/textarea content, and license or conditional comments. Custom white-space styles may change meaning, so review the result before delivery.

Are framework templates and full validation supported?

This release targets standard HTML, without guarantees for JSX, Vue/Svelte or server templates. Parser diagnostics do not establish complete HTML compliance, accessibility or runtime correctness.

Related tools

More in this category