XML Editor

Edit, format, and minify XML with a live tree.

Tree view
The tree appears here. Paste XML or click Sample.

XML Editor Online

The XML editor combines a plain-text editing area with a live tree view and one-click formatting. Type or paste markup on the left and the tree on the right updates as you go, so you always see how the parser interprets your changes. It works like a lightweight IDE for XML that needs nothing installed.

Editing actions

  • Format (2 or 4 spaces) – re-indents the entire document so that every child element sits on its own line.
  • Minify – collapses the document onto as few characters as possible while keeping comments.
  • Remove comments – minifies and strips comments, handy before embedding XML in a request body.
  • Undo – restores the previous version after any of the actions above.
  • Copy and Download – take the edited document to the clipboard or save it as document.xml.

Live error checking

Each keystroke is parsed in the background. When a tag is left open, an attribute is missing its quotes, or an ampersand is not escaped, the input turns red and the message tells you the exact line and column. The tree only renders for well-formed documents, so a visible tree is proof that the file will load in any standards-compliant parser.

Click a node in the tree to see its XPath and the markup of that subtree. It is a quick way to find where a deeply nested element lives in a long configuration file, or to copy one record out of a large export to use as a test fixture.

When to use it

Adjusting Spring or Maven configuration, tidying an SVG before committing it, preparing SOAP request bodies, or cleaning up XML pasted from a log where all indentation was lost — the editor handles all of these without uploading anything, because every operation runs in your browser.

For read-only exploration use the XML Viewer. To turn your XML into a string literal, try XML Stringify, and to escape special characters use XML Escape. Transform documents with XSLT or compare two versions in XML Diff.

Frequently Asked Questions

Yes. Every action that rewrites the document — Format, Minify, Remove comments, loading the sample, opening a file, or Clear — is recorded, and Undo steps back through the last 20 versions.

Minify removes the whitespace between tags but keeps your comments. Remove comments minifies as well and also drops every <!-- comment -->, which produces the smallest possible file.

Formatting needs a well-formed document. While the XML contains an error, the buttons are disabled and a message shows the line and column of the problem. Once it is fixed they become active again.

No. Only the whitespace between elements changes. Element names, attributes, text content, CDATA sections, and entity-escaped characters such as &amp; are preserved exactly.