Home › Formatters › HTML Formatter

HTML Formatter

Minified or machine-generated HTML is hard to review. This formatter re-indents it into a clean structure while respecting void elements like images and line breaks.

HTML Formatter

How to use the HTML Formatter

  1. Paste your HTML into the input box.
  2. Choose an indent style.
  3. Press Format.
  4. Copy or download the cleaned-up markup.

About this tool

View-source on a production page usually means one enormous line of HTML. This formatter rebuilds the document with one element per line and indentation that follows the nesting, so you can find the section you are looking for. Void elements — img, br, input, meta and friends — are handled correctly and never given closing tags.