XML Tools
XML Viewer
Inspect an XML document as a collapsible tree. Browse elements, attributes, text, CDATA, comments, and processing instructions without losing your place in a large file.
✓ Every tool runs in your browser. We do not upload your input or output.
Keyboard shortcuts
Ctrl/⌘ + Enter: process
Ctrl/⌘ + Shift + F: full screen
Esc: exit full screen
Ctrl/⌘ + F in editor: search
How to use
- Paste XML into the editor, upload an .xml file, or load the sample document.
- Wait for the tree to appear, or press Process for files larger than 1 MB.
- Expand an element to inspect its attributes and child nodes; use the search field to find names or values.
- Switch to Output only or Full screen when you need more room, then copy or download the formatted XML.
Examples
Inspect an order attribute
The tree separates the order ID attribute from the customer element and its text.
<orders><order id="A-101"><customer>Avery</customer></order></orders>
<orders> → <order> → @id: A-101; <customer> → #text: Avery
Find repeated records
Each repeated item remains a separate branch, so you can compare records quickly.
<items><item sku="P1"/><item sku="P2"/></items>
<items> → <item> sku="P1"; <item> sku="P2"
A practical map of an XML document
XML can be difficult to scan when a response contains many nested elements. The viewer turns each element into a branch and places attributes and text beneath it. A record such as an order can show its id attribute beside child elements for customer, total, and status. Repeated sibling elements stay separate rather than being merged into one field.
The search field is useful when you know a value but not its location. Search for a record ID, an element name, or text content. You can collapse branches that are unrelated to the question and expand all when you need a complete overview. The input editor and tree have their own scroll areas, so exploring a long file does not move the rest of the page.
Reading safely
The viewer parses XML locally in a Web Worker. Your pasted text and uploaded files remain in the browser. It checks well-formedness, including matching tags, quoted attributes, and namespace prefixes, before showing a tree. When the XML is invalid, the error points to a line and column you can jump to in the editor.
Comments and CDATA appear as distinct rows. Formatting-only whitespace between child elements is omitted from the tree so the structural nodes are easier to find. Text inside an element remains available, including text that appears before or after a child element. The copy and download actions use the complete formatted document, even when the visible tree contains only a small number of rows.
Frequently asked questions
Does the viewer change my XML?
The tree is a read-only view. Copy and Download provide a formatted version of the parsed document; whitespace used only for indentation may be normalized.
Can I search attribute values?
Yes. Search checks element paths, attribute names and values, and visible text. Results are shown as matching tree rows.
Will a large document create thousands of page elements?
No. The tree renders only the rows near the visible scroll position, so a large document does not make the page grow.
Are namespace prefixes shown?
Yes. Qualified names such as ns:order and namespace declarations remain visible in the tree. An undeclared prefix is reported as an error.
Does it load external DTDs or entities?
No. DOCTYPE declarations are rejected, and no external resources are fetched. Remove the DTD before using this browser-only viewer.