Use our free HTML Formatter tool to beautify and format messy html code. It runs in your browser — no installation, no registration, no hidden fees.
The HTML Formatter takes HTML that has been collapsed onto a few lines, or copied from a page source, and lays it out with each tag on its own line and nested elements indented. It makes markup much easier to read when you are debugging a layout, reviewing a template or checking what a page really contains.
It is a simple, fast formatter. It does not rewrite or repair your HTML, and it runs entirely in your browser.
<br>, <hr>, <img>, <input>, <meta> and <link> without an indent.<script> and <style> blocks are not reformatted.