Back to Free Tools
FREE TOOLS
XML Formatter
Format XML while retaining mixed text, attributes, namespaces, comments, and instructions.
XML
XML
Browser only
Your input and output are processed in this browser. They are not uploaded for processing. No account is required.
This tool needs JavaScript. If it does not load, refresh the page and try again.
How to use this tool
- Paste XML text or choose a UTF-8 file; a chosen file takes precedence.
- Indentation is added only to element-only content. Existing whitespace stays by default; explicit removal changes whitespace-only text and respects xml:space.
- Select Process data, review the result, and download it. Use Reset to clear the working data.
Examples
<people><person><name>Alice</name><score>10</score></person><person><name>Bob</name><score>20</score></person></people>
Limitations
XML 1.0, UTF-8, at most 40 nesting levels and 200,000 nodes. No DOCTYPE/custom entities/external resolution. Parser normalizes line endings, entity spelling, and attribute whitespace. 5 MiB input, 20 MiB output.
Related tools
No items found.