← Tools/XML Viewer
Free tool

XML Viewer Online

Open an XML file or paste XML to read it as a collapsible tree, or as neatly indented XML. Errors show the line where the XML breaks. The file stays in your browser.

XML
The tree appears here.
Put your HTML online as a live website
Drop an HTML file or ZIP on droply and get a live HTTPS link in seconds — free to try.
Publish HTML free →

How to use the XML viewer

  1. Click Open XML file, drop a file on the box, or paste XML.
  2. Read it in the Tree view: click any element to fold or unfold it.
  3. Switch to Formatted to see indented XML, and copy it if you need it.

How to open an XML file

An XML file is plain text, so any text editor opens it, but long files with no line breaks are hard to read. This viewer reads the file with your browser's XML parser and shows it as a tree: element names, attributes and text, with the first three levels open. It works for any XML, including RSS and Atom feeds, sitemaps, KML and GPX files, SVG, and config or export files.

Questions

Is my XML file uploaded?

No. The file is read and parsed in your browser and never sent anywhere.

Why does it say my XML is invalid?

The browser's XML parser stops at the first error and the viewer shows its message, which usually names the line and column. Common causes are a tag that isn't closed, a & that should be written &, or two elements at the top level instead of one.

What does the Formatted view change?

It puts each element on its own line, indented by two spaces, keeps short text on the same line as its element, and drops whitespace between elements. Attributes, text, comments and CDATA sections are kept.

Can I open an XML file on my phone?

Yes. Tap Open XML file and pick the file from your phone's files; the tree works with taps.

Related tools
HTML Viewer
See HTML rendered live
HTML Formatter
Beautify and indent HTML
ZIP Inspector
Browse ZIP file contents