XML Formatter
Pretty print minified XML and check that it is well formed.
Pretty print minified or single-line XML with consistent two-space indentation, or compact a formatted document back down. The parser reports documents that are not well formed, such as a missing closing tag.
It works for SOAP envelopes, RSS and Atom feeds, sitemaps, SVG and configuration files. Switch to the Tree view to navigate deep documents without scrolling through markup.
How to use it
- Paste XML into the editor.
- Press Format to indent it, or Minify to compact it.
- Copy the result or convert it to JSON.
Questions
Are attributes and namespaces preserved?
Yes. Attributes and namespace prefixes are kept exactly as written.
Are comments preserved?
No. Comments are dropped when the document is re-serialised.
Does it validate against an XSD?
No. It checks that the XML can be parsed, not that it conforms to an XSD or DTD.
All tools
- JSON Formatter
- JSON Validator
- JSON Minifier
- JSON Repair
- JSON Diff
- JSON Schema Validator
- JSON to YAML
- YAML to JSON
- JSON to CSV
- CSV to JSON
- JSON to XML
- XML to JSON
- YAML Formatter
- XML Formatter
- JSONL Validator
- JSON to TOON
- LLM Token Counter
- LLM Token Optimizer
- JSON to TypeScript
- JSON Schema Generator
- LLM Tool Schema Generator