HTML Beautifier
Indent a page so you can read its structure.
About this converter
Indents markup by nesting level, which is the quickest way to find the tag that was never closed or the div that ends three levels from where you expected.
Most of what gets pasted here comes out of a template engine, a CMS or a page you are inspecting, and none of those produce markup laid out for a person.
Formatting adds whitespace, and whitespace between inline elements is significant — so the formatted version can render with spaces the original did not have. Use it to read markup, not as a step before publishing it.
Frequently asked questions
Can I publish the formatted version?
Be careful. Adding line breaks between inline elements adds whitespace the browser will render, so a formatted page can space out slightly differently from the original. For reading and debugging it is exactly right; for output, keep the version you started with.
Will it fix broken markup?
No. It formats what is there rather than repairing it — though badly nested tags usually become obvious once everything is indented, which is often why people paste it in.
Does what I paste get sent anywhere?
No. Everything runs in your browser, on your own machine. Nothing is uploaded and nothing is logged. That matters more here than on most pages — source code, database queries and internal data are exactly the things that get pasted into tools like this, and most of them are a form that posts to a server.