Skip to content

Open an XML file

A collapsible tree instead of a wall of angle brackets. Fold away what you do not need, search for what you do, and see attributes and namespaces clearly.

  • Never stored
  • No queue, no waiting
  • No signup, no watermark
Tree

Paste XML, an RSS feed, an SVG or a config file and it appears here as a tree.

How it works

1

Paste or drop the file

XML, RSS, Atom, SVG, a sitemap, a config file — anything that is XML.

2

Explore the tree

Collapse branches, expand the one you want, and see how deep the document goes.

3

Search inside it

Find an element, an attribute or a value without reading the whole thing.

A tree you can actually navigate

XML in a text editor is a wall of angle brackets; the same document as a tree is something you can read. Every element becomes a row you can expand or collapse, attributes are shown beside their element rather than crowding the line, and the nesting is the indentation — so finding the one record you care about in a ten-thousand-line export is a matter of closing the branches you do not want.

A document with more than a few hundred elements opens collapsed below the root, deliberately. Drawing every row of a large export first would mean a page that takes seconds to become usable and then scrolls badly; starting collapsed makes the shape of the document visible immediately, which is what you are usually looking for anyway. Expanding as you go is both faster and a better way to understand an unfamiliar file.

Nothing is fetched and nothing is resolved. An XML document can reference an external DTD or entity, and a parser that follows those references will go and retrieve whatever they point at — a file on disk, an address on an internal network. That is the XML External Entity vulnerability, and the only complete defence is to refuse. So a document that depends on an external DTD displays without it, which is a security property rather than an omission, and it matters most for exactly the case people use a viewer for: inspecting a file they did not write.

Namespaces are shown as written rather than normalised away, because a prefix is frequently the thing you are trying to understand in an unfamiliar document. CDATA sections are displayed as the literal text they hold, and entity references are shown rather than expanded, so what you see corresponds to what is in the file.

When you want something else

When you know what you are looking for, query rather than browse. xmlstarlet sel -t -v "//order[@id='42']/total" data.xml answers a specific question with an XPath expression, and xmllint --xpath does the same. That is far quicker than expanding a tree once you can describe what you want.

For files too large to hold in memory — and XML parsed as a tree typically occupies several times the size of the file — no viewer will help. Streaming parsers such as Python's iterparse walk a multi-gigabyte document with constant memory, and less plus xmllint --format is enough to see the shape of something enormous without loading it.

Frequently asked questions

Is my file stored anywhere?

No. Nothing is stored, nothing is kept, and it works with the Wi-Fi switched off once the page has loaded.

What happens if the XML is broken?

You get the line, the column and the character, with the offending line shown and a caret under the spot — the same reporting as our XML Validator. A viewer that just says "could not parse" leaves you no better off than before.

Does it show attributes and namespaces?

Yes. Attributes are shown on their element rather than hidden, and namespace declarations are called out — an undeclared prefix is one of the commonest reasons XML fails to parse somewhere else, and it is invisible in a plain text view.

Can it open an RSS or Atom feed?

Yes, those are XML. So are sitemaps, SVG images, Android layouts, Maven POMs and most configuration files. If it is XML, it opens here.

Is this the same as the XML Formatter?

They answer different questions. The formatter gives you indented XML text to copy back into a file. This gives you a tree to read and explore, with branches you can fold away — better when the document is large and you are looking for something rather than editing it.

How large a file can it open?

Available memory, rather than a fixed size cap. Large documents open collapsed so you are not waiting for thousands of nodes to be drawn before you can do anything.

Good to know: A document with more than a few hundred elements opens collapsed below the root, so the page is usable immediately instead of drawing thousands of rows first. The whole document is held in memory, so very large XML exports are bounded by the tab rather than by the tool.

Put this tool on your website

Free for any blog, class page or help article. Paste one snippet and your visitors can use it right on your page.