HTML Formatter

Format and indent HTML code.

<div><h1>Hello</h1><p>Welcome to <a href="#">ToolBox</a></p></div>
Your file never leaves this browser tab — everything runs locally on your device.

How to use html formatter

  1. Paste your HTML into the editor.
  2. Click "Format HTML".
  3. Copy or download the cleanly indented result.

Common use cases

  • Making minified or hand-mangled HTML readable again for debugging.
  • Cleaning up markup copied from a browser's "view source" or a CMS export.
  • Standardizing indentation before a code review.

Related tools

Frequently asked questions