Skip to content
UniKit

HTML code inspector

Re-serialize the parse tree, wrap tags onto their own lines, and report element and comment counts plus an indented outline. The live rendering is done by the sandbox iframe on the page; this tool produces readable markup and structure.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

HTML source

Result

The result can be copied directly.

Paste HTML to see the tidied markup and outline

Characters: 0 · Lines: 0 · Elements: 0 · Comments: 0

What this tool does

  • Tidy a minified HTML fragment into something readable.
  • Check that tags are closed and nesting matches expectations.
  • Use the element/comment counts and outline to understand an unfamiliar template.

Example

Input

<div id="a"><p>Hi</p></div>

Output

<div id="a">
<p>Hi</p>
</div>

Tags are wrapped onto their own lines and trimmed; the outline is indented by the given number of spaces.

Frequently asked questions

Does it render the page?

No. It emits tidied source and an outline; the sandbox iframe handles live rendering.

Is the re-flow a formatter?

It is a light version: tags go on their own lines and leading/trailing spaces are trimmed, but there is no indentation layout. Use an HTML formatter for that.

What is the outline?

Line-per-node tags, comments and text truncated to 40 characters, indented by the given number of spaces, capped at 200 lines.

Is script/style content touched?

No. They are parsed as raw text, so the inner code is not re-flowed.

Keywords:html_demoHTML inspectordeveloper

Related tools