Add to Chrome Add to Edge

HTML Formatter

Re-indent messy or minified HTML so nested elements are easy to follow.


HTML Formatter

Minified or badly indented HTML is hard to debug. The formatter re-indents your markup so the structure of nested elements is easy to follow.

How to use HTML Formatter

  1. Paste your HTML into Enter your HTML Code Here.
  2. Click Format Code.
  3. Copy the tidy, indented version.

When it comes in handy

  • Reading source copied from a browser or a minified template.
  • Cleaning up HTML before committing it to version control.
  • Spotting unclosed or wrongly nested tags.

Frequently asked questions

Does formatting change how the page looks?
It only changes whitespace between tags. In rare cases whitespace inside inline text can matter, so preview the result.
Can it fix invalid HTML?
It formats what you give it but does not repair errors. Use a validator to find broken markup.

Related guides

Choose which cookies SEOpeck may use. You can change this at any time from "Cookie settings" at the bottom of every page.

Your tools

    Saved in this browser only. Nothing is sent to us.

    Popular tools