HTML Formatter
Turns single-line or badly indented HTML into a clean, readable structure.
Result
About
Places tags on appropriate lines and indents the nested structure, making minified or hand-mangled HTML easier to read and edit.
Processing happens in your browser; your code is never sent out.
How to use
- Paste your HTML into the box.
- Neatly indented HTML is produced instantly.
- Copy the result.
Frequently Asked Questions
- Does it change the content?
- No. Only whitespace and indentation are adjusted; tags and content are preserved.
- What about embedded CSS/JS?
- style and script blocks are largely preserved; the focus is on indenting the HTML structure.
Other tools
Embed this tool
Copy the code below and paste it into your site's HTML to embed this tool for free. The snippet includes an attribution link back to the source.
<iframe src="https://tooldict.com/embed/en/html-formatter" title="HTML Formatter" width="100%" height="600" style="border:1px solid #e2e8f0;border-radius:16px;max-width:680px" loading="lazy"></iframe>
<p style="font:13px/1.5 sans-serif">Powered by <a href="https://tooldict.com/en/html-formatter" target="_blank" rel="noopener">HTML Formatter</a> — Tooldict</p>