XML Formatter & Validator

Beautify, format, minify, and validate XML documents. Inspect syntax errors with line/column coordinates and query XML nodes using standard XPath 1.0 expressions.

100% Client-Side Privacy
Valid XML Document
XPath 1.0 Evaluator
Matched 0 nodes. Click "Evaluate XPath" to run query.
Input XML 0 characters
Formatted Output 0 characters

Frequently Asked Questions

How does the XML validator detect malformed tags?

The validator passes your string through the browser's native DOMParser using the text/xml MIME type. If an open tag lacks a closing tag or an attribute has unescaped quotes, the parser extracts line and column error details.

What XPath syntax is supported?

All standard XPath 1.0 expressions supported by browser DOM engines: node selectors (//item, ./title), attribute filters (//book[@category='web']), functions (count(//book), string(//name)), and predicates ([position() = 1]).

Can I minify XML for production deployment?

Yes. The Minify button strips whitespace between elements, collapses redundant spacing, and removes XML comments to minimize payload transfer size.

Is my XML document uploaded to any external server?

No. All parsing, validation, formatting, and XPath evaluations execute 100% locally in your browser.