XML Viewer
Paste XML and read it back formatted, with a parser error if the document is malformed.
How it works
The document is parsed with DOMParser (application/xml). A malformed document produces a parser error, shown in the status line. A clean parse is re-serialised with a line break inserted between every >< boundary, so each element sits on its own line and the nesting is visible. The output is plain text you can copy.
What it is for
Quickly seeing the shape of a data feed, an API response, a configuration file, or an export where everything arrived on one line. It reveals element names, which attributes each element carries, and how deep the tree goes.
Worked example
Input <catalog><book id="1"><title>Example</title></book></catalog> reports “XML formatted.” and returns:
<catalog>
<book id="1">
<title>Example</title>
</book>
</catalog>
Limits
It does not add cumulative indentation — each tag starts at column zero — it does not validate against a schema, and it does not pretty-print embedded CDATA or comments beyond the line split. For depth indentation or syntax colouring, use a dedicated XML beautifier.
When to use it
Inspecting a payload during debugging, checking which attributes an element carries, or getting a single-line export into a form you can scan.
Does it indent nested elements?
It puts each tag on its own line but does not add leading spaces per depth level.
What happens with invalid XML?
You get the browser parser's error text instead of formatted output.
Does it convert XML to JSON?
No — see the XML to JSON tool for that.
Is my XML uploaded?
No, parsing happens in your browser.