XML Parser — Parse XML Online

Work with XML, YAML, spreadsheet data, and developer utilities locally in your browser.

What this XML parser does

It reads the raw XML text, removes the whitespace sitting between a closing > and the next opening <, and then breaks the string so that every start tag, end tag and text node begins on its own line. The result is a flat, one-element-per-line view of the document — the fastest way to see the structure of XML that arrived as a single unbroken string. Because it operates on the text rather than a parsed DOM, it does not validate the document or expand entities; malformed XML is reformatted as-is.

When to use it

Useful for reading a minified SOAP envelope, comparing two XML payloads line by line, or tidying an XML snippet before pasting it into a bug report or documentation.

Worked example

Input:

<note><to>Tove</to><from>Jani</from><body>Reminder</body></note>

Output:

<note>
<to>Tove</to>
<from>Jani</from>
<body>Reminder</body>
</note>

Does this validate my XML?

No. It reformats the text so you can read it, but it does not report unclosed tags or bad entities. Use the XML Validator for a well-formedness check.

Does it indent nested elements?

It places each tag on its own line but does not add leading indentation. For fully indented output use XML Beautifier or XML Pretty Print.

Can it convert XML to JSON?

Not on this page. The XML to JSON converter walks the element tree and produces a JSON object with arrays for repeated tags.

Is anything uploaded?

No. The reformatting runs entirely in your browser and the document never leaves the page.

XML Beautifier XML Validator XML to JSON XML Pretty Print XML Minifier