Content Tools

HTML Formatter

Quick start

Processing happens locally in your browser. Input is not stored or sent to the server.

Minified HTML from a build, a chunk of a page’s source or a fragment from an email template: all unreadable while everything sits on one line. This tool puts each element on its own line and indents two spaces per nesting level, so you can see at a glance which div closes where. It also checks whether your input can be parsed at all and tells you when it cannot. Worth knowing what it does not do: it does not rewrite your HTML, does not close forgotten tags for you and does not touch attributes — the content stays exactly what you put in, only the whitespace changes. Note that whitespace inside an element can be meaningful in HTML, so after formatting do check that a pre or textarea block still looks right. Everything happens locally in your browser: your HTML never reaches our server, is never logged and never stored. Free and unlimited to use, including commercially — no account, no licence, no limits.

What people use this for

  • <div><p>Everything on one line</p><span>hard to read</span></div>
  • Each element on its own line, two spaces per level
  • Unparseable input → a message instead of silent nonsense

What others think of this tool

No reviews for this tool yet. Yours would be the first.

Frequently asked questions

Does this tool repair broken HTML?

No, and that is deliberate. The tool indents and leaves the rest alone: it does not close forgotten tags, does not remove duplicate attributes and does not reorder anything. If it did, you would get HTML back that differs from what you put in, and you would no longer know whether a problem came from your source or was introduced by the tool. What you will notice with a missing closing tag is that the indentation drifts — right at the point where the tag is missing. That makes it easy to find.

Why does my text look different after formatting?

In HTML whitespace is meaningful in some places. Inside a pre element and a textarea every space and line break counts, so indenting changes the rendering there. A line break added between two inline elements can also render as a space. For ordinary block elements it makes no difference. If you are working on an email template or a pre block, check the rendering after formatting before pasting it back.

Can I paste a whole page in here?

Yes. We impose no limit — no maximum length, no daily cap, no paid tier with more room. The only ceiling is your own browser’s working memory. A very large page may take a moment, but that happens on your machine, not on our server.

How is this different from an HTML validator?

This tool makes HTML readable; a validator checks whether it conforms to the specification. A validator tells you that an li sits outside a ul, that an alt attribute is missing or that an id occurs twice. This tool does not. Conversely, a validator tells you nothing about readability. They complement each other: format first so you can see what is there, then validate if you want to be sure it is correct.