XML Formatter

Pretty-print and validate XML with proper indentation. Free and private. Everything runs in your browser; your data is never uploaded.

Paste in minified or single-line XML. An API response, an SOAP payload, an RSS feed, a config file, and get it back indented with consistent line breaks and nesting so you can actually read the tag structure and spot where a value or attribute lives.

How to use it

  1. Paste or drop in your XML
  2. Set your preferred indent width
  3. Copy or download the formatted result

Frequently asked questions

Will this validate my XML, or just reformat it?
It parses the XML to reformat it, so malformed markup (mismatched tags, bad nesting, unescaped characters) will throw an error instead of silently producing garbled output, but it's not a full schema validator, so it won't check against a DTD or XSD.
Does it preserve comments, CDATA, and processing instructions?
Yes. Comments, CDATA sections, and processing instructions like <?xml-stylesheet?> are kept in place and indented along with the surrounding elements, not stripped out.
Can I use this on a large XML file, like an exported feed or config?
Yes, since everything runs locally in your browser tab rather than on a server. There's no upload step or file size limit imposed by a backend, though very large files (tens of MB) may be limited by your browser's own memory.