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.
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.
About this tool
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.

Paste, open a file, or drop it on the editor.
See errors with line and column, or the document summary.
Open and close branches, or switch to Formatted or JSON.
Run XPath, copy formatted or minified XML, download XML or JSON.
Errors with line and column numbers.
Colour-coded tags, attributes and text.
2 spaces, 4 spaces or tabs.
Find nodes and calculate values.
From sitemaps to invoices
Check a sitemap or RSS feed is valid.
ExampleA sitemap.xml that Google rejects shows an unmatched tag on line 214.
Read SOAP and older XML APIs.
ExampleA SOAP response is pretty-printed and queried for the status code.
Inspect XML exports from accounting software.
ExampleA Tally XML export is opened to check ledger names.
View KML and GPX files.
ExampleA GPX track is opened to count its waypoints with count(//trkpt).
Read Android manifests and plist files.
ExampleAn AndroidManifest.xml is checked for permissions.
Move XML data into modern tools.
ExampleA product feed is converted to JSON for a JavaScript app.
Find problems faster
The error points to where the parser gave up. The real mistake, such as a missing closing tag, is often just before it.
//tag finds a tag anywhere, //tag[@attr="x"] filters by attribute, and count(//tag) counts matches.
Inside text, & must be written as & and < as <, or the XML becomes invalid.
Documents with a default namespace may need local-name() in XPath, for example //*[local-name()="title"].
Create a valid sitemap.xml from a list of URLs with the XML Sitemap Generator.
Open Sitemap GeneratorSenior 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
Featured on
Toolyconvert is listed on these product directories and launch platforms.