1. Step-by-Step Workflow
Paste an XML document, RSS/Atom feed, SOAP envelope, or Maven pom.xml into the editor. Switch between Formatted XML, Minified XML, XML → JSON, and XPath tabs—or type an XPath query to filter matching nodes in real time.
THE TOOLBOX / DATA & MARKUP UTILITIES
Validate XML tag nesting, pretty-print or minify markup, evaluate XPath queries, and convert XML trees into structured JSON locally in your browser.
Ready. Paste XML to validate, format, convert to JSON, or run XPath queries.
THE DETAILS
Paste an XML document, RSS/Atom feed, SOAP envelope, or Maven pom.xml into the editor. Switch between Formatted XML, Minified XML, XML → JSON, and XPath tabs—or type an XPath query to filter matching nodes in real time.
Under the W3C XML 1.0 (Fifth Edition) specification, every opening tag must match its closing tag in exact case, all attribute values must be quoted, and the document must have a single root element. The tag-stack validator pinpoints the exact mismatched or unclosed element name.
Converting XML to JSON requires disambiguating attributes from child elements. Attributes are mapped to @attribute keys, leaf text nodes become string values (or #text when combined with attributes), and repeated sibling tags automatically group into JSON arrays.
SAML assertions, SOAP envelopes, and enterprise ERP feeds never leave your browser tab. Working with HTML entities, SVG icons, or YAML configs? Try the HTML entity & markup formatter, SVG optimizer, and YAML ↔ TOML ↔ JSON converter.
| XPath / XML Task | Expression / Output | CLI Equivalent |
|---|---|---|
| Filter by attribute | //service[@env="production"]/name/text() | xmllint --xpath '...' file.xml |
| Extract attribute values | //service/@id | xmlstarlet sel -t -v '//service/@id' |
| Pretty-print XML (2 spaces) | Indented hierarchy with inline leaf text | XMLLINT_INDENT=" " xmllint --format |
| Convert XML to JSON | @attr + array grouping | xq '.' file.xml |
A raw & or < inside XML text content is a fatal syntax error. Escape them as & and < or wrap code blocks in <![CDATA[...]]>.
XML tags are strictly case-sensitive: opening <Service> and closing </service> will trigger a mismatched closing tag error.
An XML fragment with two top-level sibling elements is not a well-formed XML document. Wrap sibling fragments in a single parent container tag.
Prefixed tags like <soap:Envelope> must match their exact prefix in the closing tag (</soap:Envelope>).
Yes. All XML tag-stack validation, pretty-printing, minification, XPath evaluation, and XML-to-JSON conversion execute 100% client-side in your browser with zero server uploads.
Element attributes are prefixed with @ (for example, "@id": "srv-101") and mixed text content is stored under "#text", preventing collisions between attribute names and child element tags while grouping repeated sibling tags into JSON arrays.
The evaluator supports absolute paths (/catalog/service), recursive descendant searches (//service), attribute equality predicates (//service[@env="production"]), text extraction (/text()), and attribute extraction (/@id).
Switch to the Minified XML tab. The minifier strips <!-- ... --> comments and inter-element indentation whitespace between > and < while keeping text inside leaf elements intact.
Unlike HTML5, strict W3C XML 1.0 has no implicit void elements. Every XML tag must either have a matching closing tag (<br></br>) or use self-closing syntax (<br/>).