Skip to main content
Calctrove Calctrove

HTML Minifier

HTML Minifier

Minify HTML by removing comments and collapsing whitespace.

Result size

0chars

Live update on input changes.

File input

Choose a file

Click, drop, or paste from clipboard.

Options

0 option(s)

No additional options required.

More actions
Input: manual
InputsText/FileManual input • Auto-updateWaiting

Your input is processed locally in your browser whenever possible. We do not store your data.

Flow
  • Parse input as HTML structure.
  • Remove comments and collapse safe whitespace.
  • Emit compact output while preserving document semantics.
Example

Worked example: compact a card template

  1. 1 Input contains comments and multi-line indentation.
  2. 2 Minifier strips comments and extra spacing.
  3. 3 Output keeps structure with fewer bytes.

Compact output is ready for transfer-size checks.

How
  1. Paste HTML markup into the source panel.
  2. Run minify to compact output.
  3. Copy minified HTML for embed or deployment workflows.
Cases
  • Reduce static-page payload size before release.
  • Compact snippets for CMS and email embeds.
  • Compare pre/post-minify output in build QA.
Avoid
  • Assuming minifier fixes invalid HTML syntax.
  • Editing compact output directly instead of source templates.
  • Skipping visual smoke tests after minification.
FAQ
Does html minifier send my input to a server?

No. HTML Minifier handles the input in your browser whenever possible, so routine conversions, previews, and copy actions stay on your device instead of being sent to Calctrove servers.

Will this execute scripts inside my HTML?

No. The tool transforms text only and does not execute embedded scripts.

Should I keep readable source HTML too?

Yes. Keep readable source for maintenance and use minified output for distribution.

Switch
Switch12