HTML Formatter
Beautify and indent HTML markup.
OpenPrint the element tree the browser builds from your markup, so misplaced nesting is obvious.
Add the snippet whose structure you want to check.
The real HTML parser applies its usual corrections.
Elements and short text nodes are indented by depth.
Spot where the parsed tree differs from what you wrote.
Your markup puts a <div> inside a <p>, and the page renders strangely. The browser quietly restructured it, but reading the source will not show you how. An outline of the parsed tree does.
The visualizer hands your HTML to the browser's parser and prints the resulting body as an outline. Each element appears as its tag name in angle brackets, indented two spaces per level, and each non-empty text node appears in quotes, trimmed and cut to 40 characters. Attributes and comments are left out to keep the outline short. The tree refreshes on every edit and can be copied or downloaded.
The value is in seeing the parser's corrections. A <div> inside a <p> closes the paragraph early, stray table content is moved out of the table, and missing closing tags are filled in. Compare the outline with your source to find where the two disagree. Only the contents of body are shown, so title and meta tags that belong in head do not appear. For a list of unbalanced tags in the source itself, use the HTML structure validator, and to keep attributes in the output, serialize it to JSON with attributes. The HTML indenter shows your source with its original nesting for comparison.
The outline comes from a detached document created with DOMParser in this tab, so nothing is rendered, executed or uploaded.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
The browser applies the HTML parsing rules before the tree is printed. Invalid nesting is corrected, implied tags are added and some elements are moved. The outline shows the corrected version, which is what CSS and JavaScript actually see.
Not in this view; only tag names and text are shown. HTML to JSON lists every attribute for each element.
Text is truncated to 40 characters so the outline stays readable. The full text is still in your source; the tree is meant for structure rather than content.