Format or minify XML in the browser. JSON and XML have their own page: JSON to XML
A flat XML string is hard to scan. This page indents one root element, or writes it back on one line. Turning JSON into XML stays on JSON to XML.
<note><to>Ada</to><body>hello</body></note>.note, then to with Ada, then body with hello, each child indented by two spaces.<note><to>Ada</to><body>hello</body></note>.There must be one root element. A comment and a CDATA block are kept. An attribute is written back with double quotes. Text is trimmed. Two root elements, or a tag that never closes, stops with an error. This page does not sort elements and does not drop a default namespace.
Typing runs Format. Minify runs when you press Minify.
No. That conversion is on JSON to XML, which also converts back.