Convert compact or malformed XML into clean, indented markup with proper tag nesting. Ideal for inspecting API responses, config files, and SOAP payloads.
Key Features
Automatic hierarchical indentation based on XML opening and closing tags
Maintains element attributes and namespace declarations cleanly
Preserves CDATA blocks and XML processing instructions
Identifies unclosed tags and basic structural malformations
How to Use
Paste your minified or single-line XML into the input box.
Select your preferred indent size (2 spaces or 4 spaces).
Click "Format XML" to indent the document structure.
Review the clean hierarchy in the output viewer.
Copy the formatted XML to your clipboard or download it.
No. CDATA sections (<![CDATA[...]]>) are treated as literal raw content and are preserved without any internal reformatting or modification.
Does this tool validate XML against an XSD schema?
It validates well-formedness according to the XML specification (matching tags, quotes around attributes), but does not check against external DTD or XSD schemas.
Can it handle self-closing tags like <item />?
Yes. Self-closing elements are recognized and formatted cleanly without introducing superfluous closing tags.
Privacy notice: when you run this tool, your input is sent over HTTPS to our server, processed in memory and returned. It is not stored or logged. Avoid pasting live secrets such as private keys or passwords.