Skip to content
DDevToolery

HTML Formatter

Reindent HTML without executing it.

Loading tool…

About this tool

Reindents markup into a readable shape by parsing it into a tree and printing it back out. Nothing in the document is executed — scripts are treated as opaque text, and no resource it references is fetched.

Limitations

  • Whitespace is significant between inline elements, so reformatting can shift rendered spacing.

Questions

It changed my whitespace between tags.
Whitespace between inline elements is rendered, so the formatter preserves a single space rather than removing it. Content inside pre and textarea is left exactly as written.

Privacy

This page does its work in your browser. What you paste is processed by JavaScript running on your own device and is never sent to a DevToolery server — there is no server that could receive it. The page itself is a static file delivered by a CDN. See exactly what is stored.