Skip to content
XML → Tree / Formatted / JSONDeveloper tools

XML Viewer & Validator

Open, validate and explore XML as a collapsible tree. Pretty-print or minify, run XPath queries and convert XML to JSON, all in your browser.

Did this tool work for you?

About this tool

About XML Viewer & Validator

XML Viewer makes XML files readable and checks that they are valid. Paste XML, open a file such as .xml, .xsd, .xsl, .svg, .rss, .kml, .gpx or .plist, or drop it on the editor; it is read by your browser’s own XML parser and never uploaded. If the XML is not well-formed, you see the parser’s message with the line and column of the problem, such as a closing tag that does not match. If it is valid, a summary shows the number of elements, attributes and the maximum nesting depth. The Tree view shows the document as a collapsible outline: tags, attribute names, attribute values and text are coloured differently, each branch shows how many children it has, and you can open and close branches to explore large files; very large documents show their first 5,000 elements so the page stays fast. The Formatted view pretty-prints the XML with 2 spaces, 4 spaces or tabs, keeping comments, CDATA and processing instructions, and you can copy it or the minified version with all indentation removed. The JSON view converts the document to JSON, with attributes as @name keys, text as #text when an element also has attributes or children, and repeated elements turned into arrays. The XPath box runs queries such as //book/title or //price[@currency="INR"] against the document and shows the matching nodes or the value of expressions like count(//book). Download the formatted XML or the JSON with one click.

XML Viewer & Validator tool

Who opens XML files

From sitemaps to invoices

Sitemaps and feeds

Check a sitemap or RSS feed is valid.

ExampleA sitemap.xml that Google rejects shows an unmatched tag on line 214.

API responses

Read SOAP and older XML APIs.

ExampleA SOAP response is pretty-printed and queried for the status code.

E-invoices and exports

Inspect XML exports from accounting software.

ExampleA Tally XML export is opened to check ledger names.

Maps and GPS

View KML and GPX files.

ExampleA GPX track is opened to count its waypoints with count(//trkpt).

App configuration

Read Android manifests and plist files.

ExampleAn AndroidManifest.xml is checked for permissions.

Converting to JSON

Move XML data into modern tools.

ExampleA product feed is converted to JSON for a JavaScript app.

XML tips

Find problems faster

Read the line and column

The error points to where the parser gave up. The real mistake, such as a missing closing tag, is often just before it.

XPath basics

//tag finds a tag anywhere, //tag[@attr="x"] filters by attribute, and count(//tag) counts matches.

Escape special characters

Inside text, & must be written as & and < as <, or the XML becomes invalid.

Namespaces

Documents with a default namespace may need local-name() in XPath, for example //*[local-name()="title"].

Building a sitemap?

Create a valid sitemap.xml from a list of URLs with the XML Sitemap Generator.

Open Sitemap Generator

Working with JSON?

Format and validate JSON with the JSON Formatter.

Open JSON Formatter
Built & tested by

HemantInsights

Senior Software Engineer · Developer of Toolyconvert

Hemant developed XML Viewer & Validator and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.

Last updated 12 November 2026

Answers and guidanceFrequently Asked Questions
How do I open an XML file online?
Paste the XML or open the file. It is shown as a collapsible tree, and you can switch to formatted text or JSON.
How do I validate XML?
The XML is checked as soon as you paste it. Errors show the line and column; valid XML shows a summary.
Does it check against an XSD schema?
No. It checks that the XML is well-formed, not that it matches a schema.
What is XPath?
A query language for XML. For example, //book/title finds every title inside a book.
How is XML converted to JSON?
Elements become keys, attributes become @name keys, repeated elements become arrays and mixed text becomes #text.
Can I minify XML?
Yes. Copy minified removes indentation and line breaks.
Which files can I open?
XML and XML-based files such as XSD, XSL, SVG, RSS, KML, GPX and plist.
Is there a size limit?
Large files work; the tree shows the first 5,000 elements to keep the page fast.
Is my file uploaded?
No. It is parsed in your browser.
Is it free?
Yes, free with no sign-up.
More tools for your workflowRelated Tools

Featured on

Toolyconvert is listed on these product directories and launch platforms.