XML

XML formatter

Turn single-line XML responses and config files into properly nested, readable markup, and find out right away if the document is well-formed.

response.xmlDetected: XML ✓
<?xml version="1.0"?><order id="1042"><customer>Ada</customer><items><item sku="B-1">Book</item><item sku="P-9">Pen</item></items></order>
output.xml
<?xml version="1.0"?><order id="1042">  <customer>Ada</customer>  <items>    <item sku="B-1">Book</item>    <item sku="P-9">Pen</item>  </items></order>
✓ Well-formed XML · formatted locally

Readable nesting

XML responses from SOAP services, feeds and legacy systems are often delivered on a single line. The formatter indents each nested element so the structure is visible, keeping short text-only elements like <customer>Ada</customer> on one line.

Comments, CDATA and declarations

XML comments, CDATA sections, processing instructions, doctype declarations and the <?xml ?> prolog are preserved as written rather than being reinterpreted.

Minify when size matters

Need the opposite? Minify removes the whitespace between elements. Use Swap to move formatted output back to the input and continue editing.

Formatting needs well-formed XML

A formatter cannot sensibly indent markup that does not nest correctly, so DocuFormat checks well-formedness first. If something is off, you get the reason and position. See the XML validator for what it catches.

Questions, answered

Does it validate against an XSD or DTD?

No. It checks that the XML is well-formed, not that it conforms to a schema.

Are comments and CDATA kept?

Yes, they are preserved as written.

Can it minify XML?

Yes. Use Minify to remove whitespace between elements.

Try the XML formatter on your own input.

Paste it, format it, and fix it if it is broken, once DocuFormat opens.