XML Viewer

Format, validate and browse XML as a collapsible tree.

The XML Viewer formats or minifies XML, validates it and shows the document as a collapsible tree. Choose 2 or 4 spaces for indentation and see errors with a line and column. It suits developers working with config files, SOAP responses, RSS or sitemap documents.

What is XML?

XML (Extensible Markup Language) is a text format for structured, hierarchical data made of nested elements, attributes and text. A well-formed document has exactly one root element, every opening tag has a matching closing tag, tags nest properly, and attribute values are quoted. Unlike HTML, XML does not tolerate unclosed tags. Formatting adds indentation so the hierarchy is visible, while minifying removes whitespace between elements. A tree view makes deeply nested documents easier to navigate by letting you collapse sections.

How to use XML Viewer

  1. Provide XML Paste into the XML box or load a file with the file button.
  2. Choose indent and action Pick 2 spaces or 4 spaces and Format or Minify.
  3. Read the result The Formatted XML pane updates as you type; the tree view appears below when the XML is valid.
  4. Fix errors If Invalid XML appears, use the message and its line and column to find the problem.

Frequently asked questions

Does it validate against a schema?

No. It checks that the XML is well-formed only. XSD or DTD validation is not performed.

What does Minify remove?

Whitespace between elements and indentation. Text content and attributes are kept.

Are comments preserved?

Yes, comments are kept in formatted and minified output and appear in italic in the tree view.

Why is the output blank?

If the input has a well-formedness error, the output pane stays empty and the error is shown instead.

Can I fold parts of the document?

Yes. In the tree view, click an element's line to collapse or expand its children.