XML Formatter
v1.0XML Formatter pretty-prints or minifies an XML document without changing element order, attributes, CDATA, comments or processing instructions. Paste, upload or load a sample. Input and formatted output sit side by side with XML syntax highlighting, and you can copy or download the output.
Checking runs as you type and doesn't stop at the first problem. A document with a duplicate attribute, an unquoted value and a mismatched closing tag shows all three at once, each with its line and column and a Jump button that takes you to that spot in the editor. A stray closing tag closes up to the matching parent instead of causing a pile of follow-on errors. Formatting itself needs valid XML.
The sample menu has a small book catalog and a Broken catalog with six different mistakes, so you can see the full error list and try every Jump. Format and Minify stay clickable on invalid input. The editor panes shake, then the page scrolls down to the list of errors. With reduced motion on, it scrolls without the shake.
Indent can be 2 spaces, 4 spaces or tabs, and is remembered on this device. Cmd/Ctrl+Enter formats. Share puts the input in a link.