Toolstia / XML formatter
XML formatter
Paste XML and get it back neatly indented, or squeezed onto one line. The tool also checks that every tag is closed in the right order and tells you where it is not.
This checks that tags open and close in the right order. It is not a full schema validator, and it never leaves your browser.
How it works
- Paste your XML.
- Choose 2 spaces, 4 spaces or minify.
- Copy the result.
Beautify
Each nested element goes on its own line with indentation that shows the structure. Short elements with only text stay on one line to keep the result compact.
Minify
Minifying removes the spaces and line breaks between tags, which makes the file smaller for sending or storing. Text inside elements is kept.
Error checking
The formatter reports a closing tag that does not match, a tag that is never closed and a stray angle bracket. Fix the first error and check again.
Comments and declarations
Comments, CDATA sections, processing instructions and the XML declaration are kept in place.
Questions
Does it validate against a schema?
No. It checks that the XML is well-formed, but it does not compare it with an XSD or DTD.
Can it handle large files?
Yes for normal sizes, because it runs in your browser. Very large files may be slow.
Is my XML uploaded?
Everything happens in your browser, and nothing you type is sent anywhere.