How to use XML Formatter
- Paste one XML document into the editor.
- Choose Format, Minify or Validate only.
- Set the indentation for Format. The formatted, minified or validated XML updates as you change the input.
- Read the root and element count or copy the resulting XML.
Example: XML Formatter
Indent a small catalog with two items.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
Questions about XML Formatter
Can this validate an XML schema?
No. It checks whether the XML is well-formed, but does not load or validate an XSD.
Why did a paragraph remain on one line?
Spaces around mixed text and child tags can be meaningful, so the formatter leaves that content together.
Can I paste HTML here?
Only if it is also well-formed XML. Ordinary HTML may have unclosed tags or other syntax this parser rejects.
Can I use external entities?
No. This page refuses DTD declarations and custom entity definitions.