HTML and DOM viewer
Paste or load an HTML page and see it as a DOM tree: expand nodes, search with CSS selectors or XPath and copy the path of each element. The page's scripts are not run.
Your data stays on your computer. Files are processed in your browser and are never uploaded.
What it does
It parses the HTML as the browser would (even if badly written) and shows the resulting DOM. CSS queries use querySelectorAll, XPath ones the browser's XPath 1.0 engine.
Safety
The document is parsed without being displayed or run: no script starts and no image or external resource is loaded.
Where your data goes
The HTML stays in your browser: it is not sent to any server.
How to use it
- Paste the HTML or drop a file: the DOM tree of the first levels appears.
- Open nodes with the arrow keys or a click; type a CSS selector or an XPath query and press Enter to find elements.
- Pick a node to see its XPath and CSS path, its attributes and its HTML, and copy them.
Frequently asked questions
What is the difference between the text I paste and the DOM?
The browser repairs badly written HTML: it adds html, head and body, closes missing tags and moves some elements. The tree shows the result of that repair, what CSS and scripts see.
Which query syntax can I use?
CSS selectors (like article.post > h2) or XPath 1.0 (like //a[@class="on"]/@href); XPath can also return numbers and text, for example count(//li).
Are the page scripts run?
No: the document is only parsed, without running scripts or loading images or other resources.
Privacy
The HTML stays in your browser: it is not sent to any server.