Developer Tools

HTML Viewer

Live

Inspect HTML as escaped source and a safe structural tree.

About HTML Viewer

Inspect HTML as escaped source and a safe structural tree. Enter html in a purpose-built html viewer interface designed for this subject. HTML is parsed in an inert document and represented as escaped text and tag hierarchy; scripts and remote resources are not executed. The result includes element structure, escaped source, elements, supporting detail, and clear units or diagnostics. Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements. Processing stays in your browser, and UtilityPages does not store the values you enter.

Set up HTML Viewer

Workspace

Source workbench

Edit the source fields below and inspect the rendered output alongside your work.

This workspace updates as you edit.

Enter html.

HTML Viewer result

Enter the values above, then process to see a detailed result.

How HTML Viewer works

HTML is parsed in an inert document and represented as escaped text and tag hierarchy; scripts and remote resources are not executed.

How it works

HTML is parsed in an inert document and represented as escaped text and tag hierarchy; scripts and remote resources are not executed. Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements.

Examples

HTML Viewer worked example

Example input
{
    "source": "<main><h1>UtilityPages</h1><p>Fast tools.</p></main>"
}
Expected result
{
    "structure": [
        {
            "index": 1,
            "element": "main"
        },
        {
            "index": 2,
            "element": "h1"
        },
        {
            "index": 3,
            "element": "p"
        }
    ],
    "escaped_source": "&lt;main&gt;&lt;h1&gt;UtilityPages&lt;/h1&gt;&lt;p&gt;Fast tools.&lt;/p&gt;&lt;/main&gt;",
    "element_count": 3
}

Privacy

This tool does not store your inputs or results on UtilityPages.org.

Frequently asked questions

How does the HTML Viewer work?

HTML is parsed in an inert document and represented as escaped text and tag hierarchy; scripts and remote resources are not executed.

What information should I enter?

Enter html. Use values and units from the same scenario so the result is internally consistent.

What results does this tool provide?

It reports element structure, escaped source, elements, including intermediate context where it helps you review the answer.

What limitations should I know about?

Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements.