XML Formatter & Indenter
Prettify and indent XML documents with syntax validation and customizable tag spacing.
- 100% free
- Files stay on your device
- No sign-up, no watermark
Related Developer Utilities
What is XML Formatter & Indenter?
The XML Formatter pretty-prints XML so that each element sits on its own line, indented according to its depth. Paste single-line or messy XML — SOAP messages, sitemaps, RSS feeds, Android layouts, config files — and choose 2 spaces, 4 spaces or tabs. Attribute values and text content are kept exactly as they are.
How to use XML Formatter & Indenter
- 1
Paste XML
Paste the XML document or load the sample.
- 2
Pick indentation
Choose 2 spaces, 4 spaces or tabs.
- 3
Copy
Copy the formatted XML.
Frequently asked questions
Does it validate the XML?
Malformed XML, such as unclosed tags, produces uneven output. Use XML to JSON for a strict parse that reports errors.
Are comments and CDATA kept?
Yes. Comments and CDATA sections are preserved and indented with the surrounding elements.
Can I format large sitemaps?
Yes. Files of several megabytes format in the browser in about a second.
Last updated: