Monu Tools

HTML Formatter

Beautify HTML with block-aware indentation, or minify it. The contents of pre, textarea, script and style are preserved.

Cómo usar HTML Formatter

  1. 01

    Paste your HTML into the input box.

  2. 02

    Choose Beautify to indent it or Minify to compress it.

  3. 03

    Pick the indent size, then copy the result.

Preguntas frecuentes

What does beautifying HTML do?

It indents elements based on their nesting and structure, while leaving the contents of pre, textarea, script and style untouched, since whitespace there is significant.

How does HTML minify work?

It removes comments and collapses runs of whitespace to a single space. It keeps single spaces between tags rather than removing them, because whitespace between inline elements is rendered and dropping it can shift the layout.

Is my HTML sent to a server?

No. Both beautify and minify run entirely in your browser, so your markup never leaves your device.

Acerca de esta herramienta

An HTML formatter that beautifies markup with block and inline aware indentation, or minifies it by collapsing whitespace and stripping comments.

The contents of pre, textarea, script and style are preserved, and everything runs locally in your browser.

Herramientas relacionadas

Usamos cookies esenciales para que el sitio funcione. Con tu consentimiento también cargamos Google AdSense, que establece cookies publicitarias. Consulta nuestra política de privacidad.