NV ToolkitFormat · Validate · Convert

XML Tools

XML Viewer — Tree & Code View

Explore any XML document as an interactive tree — elements, attributes (@-prefixed), and counts at a glance.

In short

View XML online in a collapsible tree or syntax-highlighted code view. Explore elements, attributes, and nesting at a glance — free, fast, no upload.

By NaveenKumar T · Updated

Learn: XML Tutorial: Structure, Syntax & Survival Skills

  • Collapsible element tree
  • Attributes shown as @keys
  • Expand / collapse all

Runs entirely in your browser — nothing you paste or open here is uploaded, logged, or stored.How we handle data →

Example

XML Viewer: input and output

A two-book catalog fragment — small enough to read in Code view, structured enough to show what the Tree view groups together.

Input · xml
<?xml version="1.0" encoding="UTF-8"?><catalog><book id="bk101"><title>Learning YAML</title><author>Grace Hopper</author><price>24.99</price></book><book id="bk102"><title>XML in Practice</title><author>Ada Lovelace</author><price>19.5</price></book></catalog>
Output · xml
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
  <book id="bk101">
    <title>Learning YAML</title>
    <author>Grace Hopper</author>
    <price>24.99</price>
  </book>
  <book id="bk102">
    <title>XML in Practice</title>
    <author>Ada Lovelace</author>
    <price>19.5</price>
  </book>
</catalog>

The two <book> elements, each with a different id attribute, sit side by side here in Code view — switch to Tree view in the workbench and they group under a single <book> branch with a 2-item count.

Learn more

Reading XML as a tree

XML's verbosity makes raw markup hard to scan: every piece of data is wrapped in opening and closing tags. The tree view strips the ceremony and shows the structure itself — element names as branches, attributes and text as leaves, sibling counts on every node — so a 5,000-line document becomes a dozen collapsible branches.

The viewer parses with a real XML parser, so what you see is exactly what an application consuming the document would see, including type-like details such as repeated elements forming lists.

What each tree node type means
Node typeShown asExample
ElementA branch, named after the tagbook
AttributeAn @-prefixed leaf under its element@id
Text contentThe element's value, or a #text leaf when mixed with children#text
Repeated siblingsOne branch with an item countbook (×2)
Empty elementA branch with an empty string valuenote: ""

Workflows the viewer accelerates

Inspecting SOAP responses without counting angle brackets, verifying a generated sitemap or feed has the structure you intended, exploring an unfamiliar API's payloads, and answering 'how many items does this export actually contain?' — the counts on each branch answer it instantly. When the tree is a data export, XML to JSON turns it into something a script can consume.

Help

Frequently asked questions

Everything you need to know about the XML Viewer.

01How do I use the XML Viewer?

Paste your XML or drop a file on the editor — the document opens directly in Tree view with every element foldable. Switch to Code for the formatted markup, or use Expand/Collapse all for big documents.

02How are attributes and text shown in the tree?

Attributes appear as @-prefixed keys (@id, @href) under their element, and an element's text content appears as its value (or under #text when mixed with children). Repeated sibling elements group into an array-like list with an item count.

03Can the viewer open large XML files?

Multi-megabyte documents load; the practical limit is your device's memory rather than any quota. The tree view is the expensive part — rendering tens of thousands of expandable nodes costs more than displaying the text — so for very large exports open the file in Code view, use Collapse all, and expand only the branches you need.

04Can I search inside the tree?

There's no dedicated search box for the tree itself — that JSONPath-style filter bar is a JSON-input feature. For XML, switch to Code view and use your browser's own find (Ctrl/⌘+F), or use Collapse all and navigate branches by name once the structure is visible.

Keep working

Related tools

Learn the format

Related guides

All guides →