All tools
Encoders
XML Formatter
Pretty-print, minify and validate XML — namespaces, CDATA and mixed content kept intact.
Input
Waiting for input
Output
—
What gets preserved
- Text inside elements is kept exactly — elements with mixed content (text and tags together) or
xml:space="preserve"are never re-indented. - Namespaces, attributes,
CDATAsections, processing instructions and the<?xml …?>declaration are kept. Turn off Keep comments to strip comments. - Validation checks the XML is well-formed; it doesn't validate against a DTD or XSD schema.