XML Formatter
Turn compact or messy XML into cleanly indented, readable markup. Runs entirely in your browser.
How it works
- 1
Paste your XML
A snippet or a whole document.
- 2
Read the formatted result
Nested elements are indented.
- 3
Copy it
Ready for config files, feeds or debugging.
Related tools
Other tools people use right after this one.
Built to get out of your way
487
Tools available
6
Languages
0
Watermarks added
2h
Until your files are erased
100%
Free to start
∞
Devices supported
Frequently asked questions
No, it only reformats. It does not check that the XML is well-formed.
Why format XML
XML from APIs, feeds and config files often arrives on a single line. Indenting nested elements makes the hierarchy obvious and errors like a missing closing tag easy to spot.
Short text-only elements stay on one line, like <name>Alice</name>. Declarations and self-closing tags are preserved. This formatter only changes whitespace, not the data.