XML Viewer
Explore an XML document as a collapsible tree: elements, attributes and text, with the JSON kept for Copy.
What the XML viewer shows
The document is parsed into a value tree first — an element becomes an object, a repeated element becomes an array, attributes are collected under @attrs and text under #text — and the tree is a collapsible view of that. Repeated siblings becoming an array is the part worth checking by eye, because it is what a converter or a script will see. Copy and Download still hand you the JSON, so the tree is a view and not a second format.
How to use it
XML Viewer: paste the XML into the box above, and press Run to get the tree below.
Worked example
Input:
<?xml version="1.0"?>
<feed>
<title>AllTools</title>
<entry id="1">
<title>JSON tools</title>
<author>Ada</author>
</entry>
<entry id="2">
<title>XML tools</title>
</entry>
</feed>
Output:
{
"feed": {
"title": "AllTools",
"entry": [
{
"@attrs": {
"id": "1"
},
"title": "JSON tools",
"author": "Ada"
},
{
"@attrs": {
"id": "2"
},
"title": "XML tools"
}
]
}
}
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads XML and returns tree; reloading the page discards both.
The document is parsed into a value tree first — an element becomes an object, a repeated element becomes an array, attributes are collected under @attrs and text under #text — and the tree is a collapsible view of that. Repeated siblings becoming an array is the part worth checking by eye, because it is what a converter or a script will see. Copy and Download still hand you the JSON, so the tree is a view and not a second format.
Explore an XML document as a collapsible tree: elements, attributes and text, with the JSON kept for Copy.
How to use it
XML Viewer: paste the XML into the box above, and press Run to get the tree below.
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads XML and returns tree; reloading the page discards both.
What to Expect
Best for
- Converting XML to tree when the data is already on screen.
What this tool keeps
- Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.
Sample input
<?xml version="1.0"?> <feed> <title>AllTools</title> <entry id="1"> <title>JSON tools</title> <author>Ada</author> </entry> <entry id="2"> <title>XML tools</title> </entry> </feed>
Sample output
{ "feed": { "title": "AllTools", "entry": [ { "@attrs": { "id": "1" }, "title": "JSON tools", "author": "Ada" }, { "@attrs": { "id": "2" }, "title": "XML tools" } ] } }
Frequently asked questions
How do I use the xml viewer?
XML Viewer: paste the XML into the box above, and press Run to get the tree below.
Is my input uploaded?
No. The text is parsed on this page with JavaScript and is never posted to a server.
Is there a size limit?
Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.