XML Formatter & Minifier
Instantly beautify tangled XML and SVG code with hierarchical indentation, or minify it to save bandwidth. Download as a clean .xml file.
How to Format XML
Paste XML or SVG
Paste your raw, compressed, or poorly indented XML or SVG markup into the input editor.
Click Prettify or Minify
Prettify adds readable indentation. Minify strips all whitespace for compact output.
Download or Copy
Use Copy to clipboard for quick pasting, or Download to save as a .xml file.
Frequently Asked Questions
Does this work with SVG files?
Yes! SVG is valid XML, so you can paste SVG markup and format it exactly the same way. This is useful for cleaning up SVG exports from tools like Figma or Illustrator.
Can it validate XML?
The formatter uses a lightweight parser that correctly handles most well-formed XML. For strict schema validation (XSD, DTD), you would need a dedicated XML validator.
Is my XML data private?
Completely. Formatting is done in your browser with pure JavaScript. No data is sent to any server.