XML Prettifier (Indent + Format)
Take any XML (SOAP response, RSS feed, config file) and reformat with proper indentation. Configurable indent width. Preserves CDATA sections and comments correctly.
How to use the XML Prettifier (Indent + Format)
Paste XML — a SOAP response, RSS feed, or config file — set the indent width, and the indented version appears below with CDATA sections and comments preserved. Copy the result.
Indenting XML safely
Re-indenting XML sounds trivial until a naive formatter mangles the parts where whitespace and content matter — collapsing a CDATA section, dropping comments, or reflowing text that was meant to be preserved. For SOAP payloads and config files, that corruption can change meaning, not just layout.
This reformats XML with a configurable indent width while deliberately preserving CDATA sections and comments intact, so the output is readable without being altered. It is the indentation-focused sibling of the XML formatter, which additionally minifies and reports well-formedness errors; for schema validation, the XML validator checks against a DTD or XSD.
Common use cases
- Preserve CDATA — indent without collapsing CDATA blocks.
- Keep comments — reformat config XML with comments intact.
- Read a payload — make a SOAP or feed document legible.
- Match your indent — choose 2-8 spaces.
- Clean an export — tidy machine-emitted XML for review.