Explore XML documents as an interactive tree. Expand and collapse elements, inspect attributes, text, comments and CDATA, and see your document's structure at a glance.
Paste XML in the input panel and the tree appears here
Elements, attributes, text, comments and CDATA each get their own row
Load sample data to get started
What this tool can do
Expandable Hierarchy
Elements open and close to reveal the document's nesting
Attribute Chips
Every attribute rides beside its element as name="value"
Comments & CDATA
Non-element nodes appear as their own labelled rows
Declaration & Doctype
The XML declaration, doctype and processing instructions are shown
Real XML Parsing
Malformed XML reports the error with line and column
Expand & Collapse All
Open or close the whole document in one click
Live Updates
The tree rebuilds as you type; Ctrl+Enter forces a re-run
Copy Source
One click puts the XML document on your clipboard
Methodology and approach
The viewer parses the document with a real XML parser and maps the result onto a tree of view nodes: elements keep their names, attributes and child order, and comments, CDATA sections, processing instructions and the XML declaration each become their own row. Indentation-only whitespace is dropped so a pretty-printed document stays readable, and a document that does not parse reports the parser's error with its line and column instead of a partial tree.
This tool is designed to help developers, engineers, and anyone working with code and data perform common development tasks quickly and accurately. It processes your input using proven algorithms and displays detailed results.
Use this tool whenever you need to format, validate, transform, or analyze code, data, or configuration. It is useful for software development, debugging, data processing, and everyday programming tasks.
While this tool provides accurate results using well-tested methods, always verify critical outputs for your specific use case. Some edge cases may require additional validation depending on your requirements.
Common questions about this tool