XML Pretty Print
Paste compact XML and reformat it into readable, consistently indented markup.
Last updated: May 28, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is XML Pretty Print?
XML Pretty Print validates XML and rewrites it with predictable indentation. It is focused on one job: turning compressed, single-line, or inconsistent XML into readable code that is easier to inspect, review, and commit. You can control indentation, comment preservation, text trimming, and XML declaration handling.
How to Use XML Pretty Print
Paste XML into the input panel.
Choose 2 spaces, 4 spaces, or tabs.
Decide whether to preserve comments and the XML declaration.
Review any validation error below the input.
Copy or download the formatted XML output.
Common Use Cases
- Formatting minified XML API responses.
- Normalizing XML config files before code review.
- Making SOAP envelopes readable during debugging.
- Preparing XML examples for documentation.
Example Input and Output
A compact XML configuration becomes readable with 2-space indentation.
<settings><feature enabled="true">auth</feature></settings><settings>
<feature enabled="true">auth</feature>
</settings>Privacy
All XML pretty-printing happens client-side, so sensitive XML never leaves your browser.

