Workspace Files stay on your device
data · format
XML Pretty-Printer
Re-indents XML with 2 spaces per level: one element per line, text-only elements kept inline, attributes preserved in order, comments kept. The document is parsed and re-serialised, so the tree is identical — only whitespace between elements changes.
A little guidance. A better result.
How to use XML Pretty-Printer
Re-indent XML 2 spaces per level — same tree, attributes and comments preserved.
Prepare your input
Paste well-formed XML.
Use the workspace
Inspect the re-indented document.
Check your result
Check attributes, comments and text in your consuming application.
Know the limits
Whitespace can be significant in mixed-content XML; inspect documents where spaces affect visible text.
Where does my input go?
This browser tool processes your input on your device. Optional analytics is a separate choice; it is not needed to use the tool. Keep your original until you have checked the result.
Read the privacy details →Made for the work in front of you.Report a problem ↗