XML Formatter and Validator
Indent XML documents for readability and check that they're well-formed.
Readable XML
SOAP responses, RSS feeds, sitemaps, e-invoices and config files often arrive as XML on a single line. The XML Formatter re-indents the document so nested elements are easy to read.
Well-formedness check
The tool checks that the document is well-formed: unclosed tags, bad nesting or invalid characters are reported instead of producing broken output.
Content preserved
Only the whitespace between elements is rearranged; text content and attribute values don't change. The document is processed in your browser.
How to use XML Formatter and Validator
- Paste your XML document.
- The tool validates and formats it.
- If there's an error, read the message and fix it.
- Copy the formatted XML.
Why use this tool?
Inspect XML quickly in integration projects while sensitive documents stay on your device.
FAQ
Does it change element content?
Only whitespace between elements is rearranged; text and attribute values are kept.
Does it validate against an XSD schema?
No, it checks well-formedness; schema validation isn't supported.
Can it open large XML files?
Documents of a few megabytes are fine; very large files may take a moment on slow devices.
Related tools
JSON Formatter and Validator
Pretty-print messy or minified JSON and find errors with line and column details.
Open toolHTML Minifier
Safely remove comments and extra whitespace between tags to shrink your HTML.
Open toolXML Sitemap Generator
Create a valid sitemap.xml from a list of URLs to submit to search engines.
Open toolCSV to JSON Converter
Convert CSV data into a JSON array of objects, using the header row as keys.
Open tool