xmltoolskit.org
XML utilities, in the browser
Say hi →

XML Tree Viewer

updated 20 August 2026 · collapsible · filter · attributes inline

Read an XML document instead of scrolling it. Every element becomes a collapsible node with its attributes shown inline and its child count on the right, and the filter box hides everything that does not match a name, a value, or an attribute.

tree
Drop a .xml file here, or
ready

XML Tree Viewer

The document is parsed with the browser's own DOMParser and rendered as nested <details> elements, so expanding and collapsing is native and works with the keyboard. Text values are truncated at 220 characters in the display so a long description cannot push the structure off screen.

How to use it

  1. Paste XML into the pane, or drop a file on it — the tree builds as you type.
  2. Set Open to depth to control how much is expanded initially: 1 for an overview, 34 to see records.
  3. Type in Filter to keep only nodes whose name, text, or attributes contain your term. The counter shows how many of the total matched.
  4. Use Expand all / Collapse all once you have found the region you care about.

How the filter works

A node is kept when its own name, its text content, or any of its attributes contain your term, case-insensitively. Because an element's text content includes its descendants' text, a matching leaf keeps its ancestors visible — you always see the path to a hit rather than an orphaned node.

That makes it a practical way to answer "where does this value appear?" in a document too large to read, without writing an XPath expression.

Reading the display

When to reach for something else

The tree is for reading. To extract values, the XPath tester is the right tool; to reshape the document, XML to JSON or the XSLT tester. For very large files, note that the whole tree is rendered as DOM nodes — a document with hundreds of thousands of elements will be slow, and XML Stats answers the shape question without rendering anything.

FAQ

Does it validate the document?

It parses it, and reports the parser error if it fails — but for a proper report with line and column, use the validator. A document that will not parse cannot be rendered as a tree.

Can I copy a node?

Select the text in the tree and copy it as usual. For a serialised subtree, use the XPath tester, which prints matched element nodes as XML.

Why is a long text value cut off?

Values over 220 characters are truncated with an ellipsis so that structure stays readable. The full text is in your input pane.

How big a file can it handle?

It is DOM-bound. Files up to a few megabytes are comfortable; beyond that the render, not the parse, is the bottleneck. Filter first, or use XML Stats.

Is the file uploaded?

No. The document is parsed and rendered locally.

Related tools

Privacy

100% client-side. The tree is built from a locally parsed document. See the privacy policy.