XML Formatter
Validate and indent XML locally, preserving mixed text content and rejecting entity declarations.
Loading tool…
How to use XML Formatter
Make element-based XML easier to read without executing its contents. Mixed text, CDATA sections, and xml:space="preserve" elements keep their original internal spacing.
- Paste an XML document without a DTD or entity declaration.
- Choose indentation and format the document.
- Review and download the formatted XML.
Good to know
- DOCTYPE and custom entity declarations are rejected; external resources are never requested by this tool.
- Up to 100,000 input characters, 20,000 nodes, and 60 nesting levels.
- Browser XML serialization may normalize attribute quoting, empty tags, and namespace declarations.
Common questions
Does this validate an XSD?
No. It checks that the XML is well-formed; it does not validate a schema.
Why was a mixed-content element left on one line?
Inserting whitespace between text and child elements could change the content, so its internal spacing is preserved.
Keep going with related tools
All developer →JSON to XML
Convert JSON into escaped, typed XML while preserving arbitrary object keys and array ordering.
DeveloperJSON Formatter
Format and indent valid JSON in your browser, with downloadable output and clear syntax errors.
SEOXML Sitemap Auditor
Inspect a pasted sitemap or sitemap index for namespace, URL, date and duplicate-entry issues offline.
DataXML to JSON
Convert XML into an ordered JSON element tree that retains attributes and mixed text content.
DeveloperJUnit XML Report Merger
Combine local legacy JUnit XML suites into one report ZIP while preserving every suite occurrence, original file and source-order evidence.
TextSelected SSML Source Auditor
Review a strict SSML 1.1 text/substitution/control profile with exact explicit pause totals, without generating audio or loading speech resources.