historia.vg / Tools / XML
Paste XML, pick an indent size, and copy the result. Handles common XML documents.
Format Indent 2 4
Not valid XML.
Format XML with xmllint:
xmllint
xmllint --format input.xml
Install:
sudo pacman -S libxml2 sudo apt install libxml2-utils