XML viewer
Paste XML to explore it as a collapsible tree, pretty-print or minify it, and see exactly where it breaks when it doesn't parse.
The browser's own XML parser
The viewer feeds your document to the native DOM parser — the same engine the browser uses for XHTML, SVG, and RSS — so what parses here parses everywhere. From the resulting DOM it builds three views: a collapsible tree for exploring, a pretty-printed version with consistent 2-space indentation, and a minified one-liner.
When the document is not well-formed, the parser stops at the first error and the viewer surfaces its message, including the line and column — usually an unclosed tag, a stray ampersand that should be &, or a second root element.
What it's good for
- Reading a machine-generated single-line XML payload a human was never meant to see
- Checking why an RSS feed, SVG file, or SOAP response fails to parse
- Exploring a large config or export file without loading an IDE
- Minifying XML before embedding it in a request or a data attribute
Frequently asked questions
Does the XML viewer validate my XML?
It checks well-formedness — matched tags, proper nesting, legal characters, one root element. If the document doesn't parse, you get the browser's error with the line and column where it broke. It does not validate against a schema (XSD or DTD).
Is my XML uploaded anywhere?
No. Parsing, the tree view, pretty-printing, and minifying all happen in your browser with the native DOM parser — nothing you paste or open leaves your machine.
What's the difference between the three views?
Tree is an explorable, collapsible outline — best for finding your way around a document. Formatted is the same XML pretty-printed with two-space indentation, ready to copy. Minified strips all inter-element whitespace for the smallest payload.
Can I open an XML file instead of pasting?
Yes — use Load a file to pick a .xml file from disk. It's read locally with the File API and dropped into the editor, never uploaded.
Does it handle namespaces, comments, and CDATA?
Yes. Namespaced element and attribute names are shown as written (like svg:path or xlink:href), and comments and CDATA sections are preserved in the tree and in both serialized views.
Related free tools
See all free tools →Built something? Put it online in seconds
host0 is the cloud for small software: bring any coding agent, build the tool only you need — like this one — and say "deploy to host0". Live at a shareable URL, no servers to run.