XML Formatter and Minifier — Validate and Adjust Indentation
Developer Tools
About This Tool
Validate XML and format element-only sections with spaces or tabs. Preserve mixed text, CDATA and xml:space content while reviewing output size.
How to Use
- Paste a well-formed XML document.
- Choose two spaces, four spaces or tabs.
- Beautify or Minify, then check the output or parsing error.
- Copy the result after reviewing whitespace-sensitive content.
Validate before formatting
The browser XML parser rejects malformed documents before output is generated. Beautify adjusts indentation in element-only sections; Minify removes indentation there. Mixed text, CDATA and xml:space="preserve" sections are kept intact. Documents with a DTD are returned unchanged after parsing.
Serialization is a change
The XML serializer may normalize quote style, entities or empty-element notation. Without a schema, whitespace between child elements cannot always be classified as insignificant. Keep the original when signatures, exact byte comparison or whitespace-sensitive consumers matter. This is not XSD validation or canonical XML.
Output information
Sizes use UTF-8 bytes; the tag counter is a simple estimate. Copy is disabled after parsing errors. Shared services are described in the privacy policy.
Frequently Asked Questions
Does it validate against an XSD?
Will every byte be preserved?
Guides & Tutorials
In-depth guides for every tool. Learn how to process your data privately, for free, right in your browser.
Read more