HTML Formatter

Indent tangled HTML into something readable, or minify it back down. Everything runs in your browser.

Result

Processed on your device. This file is never uploaded.

  1. 1Paste your HTML into the input box.
  2. 2Choose Format to indent it, or Minify to collapse it.
  3. 3Copy the tidied markup.

Markup you can actually read

HTML that arrives from a build step or a CMS is often one long line. Formatting re-indents each tag by how deeply it is nested, so the document's structure — which elements sit inside which — becomes obvious. That makes it far quicker to find the block you need to change.

Honest indentation

This formatter indents literally rather than rebuilding a corrected tree. If a tag is never closed, the indentation will drift — which is a feature: it shows you the mistake instead of hiding it. All of it happens on your device, so nothing you paste leaves the page.

Frequently asked questions