Beautify your HTML code with proper indentation and formatting for better readability.
The HTML formatter takes minified or hand-tangled markup and re-indents it into a clean tree so nesting and structure are easy to follow. It runs your HTML through BeautifulSoup's parser and prettifier, which fixes up the indentation while keeping your tags and content intact.
Paste a chunk of template output, a scraped page or a copied snippet and get back readable, properly nested HTML you can scan or hand to a teammate.
Reading minified HTML from a build step, untangling markup copied out of a CMS, making a scraped page legible, or reformatting a snippet before pasting it into a template. It is a quick way to see structure without opening developer tools.
It also normalises inconsistent indentation from different editors and build steps, so a file that several people have touched comes back reading as one consistent style. The text inside your tags is left exactly as written; only the whitespace between elements is reflowed.
No. It only re-indents and tidies the markup. The tags, attributes and text content stay the same; the parser may close obviously broken nesting.
BeautifulSoup's html.parser, which is forgiving of imperfect markup and produces consistent, indented output.
Yes. It handles complete documents with a doctype, head and body, as well as small fragments and single elements.
Formatting runs on our server, so the HTML is sent there to be parsed and is not stored. Avoid pasting anything you need to keep private.