Beautify HTML with block-aware indentation, or minify it. The contents of pre, textarea, script and style are preserved.
Cómo usar HTML Formatter
Paste your HTML into the input box.
Choose Beautify to indent it or Minify to compress it.
Pick the indent size, then copy the result.
Preguntas frecuentes
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.
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.
No. Both beautify and minify run entirely in your browser, so your markup never leaves your device.
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
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text, right in your browser.
Convert colors between HEX, RGB and HSL with a live preview.
Convert Unix timestamps to human dates and back — UTC, local, ISO 8601 and relative time. Seconds and milliseconds are auto-detected.
Percent-encode and decode URLs and URL components, UTF-8 safe.
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.