XML Viewer
Explore XML documents as an interactive tree.
Tree view
XML Viewer Online
The XML viewer turns raw markup into a collapsible tree so you can understand the structure of a document without scrolling through angle brackets. Paste XML, open an .xml, .svg, .rss, or .config file, or click Sample to load a small bookstore catalog, and the tree renders instantly next to the source.
Reading the tree
Every element is a node that can be expanded or folded. Attributes are listed next to the element name, text content is shown inline, and comments or CDATA blocks get their own rows. Expand all opens the complete hierarchy, while Collapse folds it back to the top level — useful when a document contains hundreds of repeated records and you only care about one of them.
Element details and XPath
Selecting a node opens a detail panel with the element's absolute XPath and the serialized markup of just that subtree. Copy the path to use it in code or in the XPath Tester, or copy the element to paste it into a bug report or a unit test fixture.
Document statistics
Below the input a row of chips confirms that the document is well-formed and counts elements, attributes, and nesting depth. Namespace prefixes declared in the document are listed too, which helps when an XPath query mysteriously returns nothing because the elements live in a namespace.
Typical uses
- Inspecting API responses, SOAP messages, and RSS or Atom feeds.
- Finding the right element in large configuration files such as Maven
pom.xmlor Android manifests. - Checking the structure of an export before converting it to another format.
Private and fast
Parsing runs entirely in your browser; nothing you paste is uploaded.
Related tools
Need to change the document? Use the XML Editor. To convert the data, try XML to JSON or XML to CSV, and to check syntax only, use the XML Validator.
Frequently Asked Questions
How do I get the XPath of an element?
Click any element in the tree. The panel under the tree shows its absolute XPath, such as /catalog/book[2]/title, with a Copy XPath button. Positions are only added when an element has siblings with the same name, so the path always points at exactly one node.
What happens if my XML has an error?
The tree is replaced by an error message that names the line and column where parsing stopped, for example a closing tag that does not match the element opened earlier. Fix the reported spot and the tree comes back immediately.
Does the viewer show namespaces, comments, and CDATA?
Yes. Prefixed names such as dc:creator are shown as written, declared namespace prefixes are listed in the statistics chips, and comments and CDATA sections appear as their own nodes in the tree.
Can I open large XML files?
Files of a few megabytes open fine because parsing happens locally in your browser and the tree only renders the branches you expand. Use Collapse to fold everything to the top level before exploring a big document.