XML Formatter & Minifier
Pretty-print or minify XML, with validation and configurable indent width.
Quick answer: Pretty-print or minify XML, with validation and configurable indent width.
Last updated
Frequently asked questions
- Will it validate against an XML schema (XSD)?
- No — only well-formedness (correct tags, balanced quotes, valid characters). XSD validation needs a much larger library; use a desktop tool for that.
- Is this safe for SOAP / RSS / SVG?
- Yes — all three are valid XML. The formatter preserves namespaces, CDATA sections and the XML declaration.
- Will my XML be uploaded?
- No — DOMParser runs in the browser. Nothing leaves your device.
- Why does the output sometimes wrap differently than expected?
- DOMParser normalises whitespace inside text nodes per the XML spec. Use a CDATA section or change <code>xml:space="preserve"</code> if you need exact whitespace fidelity.
- Can I minify a large XML file?
- Yes — files up to several megabytes minify instantly. Larger files (50 MB+) may approach browser memory limits.