XML formatter
Minified XML from log dumps and API responses is hard to read. Pretty-print with consistent indentation to spot mismatched tags, namespace issues, and rogue CDATA sections. Formatting runs locally — useful for enterprise configs containing internal hostnames.
How to format XML
1. Paste XML or upload .xml file.
2. Click format / beautify.
3. Review indented tree structure.
4. Copy formatted XML or fix errors shown by parser.
XML formatting examples
Maven pom.xml
One-line dependency block expanded for readable diff before commit.
SOAP fault debug
Indent nested faultstring and detail nodes to find application error code.
RSS feed check
Format channel item XML to verify pubDate and enclosure URLs.
When to format XML
• When reviewing config before deploy.
• When comparing two XML snapshots visually.
• When teaching XML structure to juniors.
XML vs JSON mindset
XML carries attributes, namespaces, and mixed content. Converting to JSON loses nuance — format XML in place when working with legacy SOAP or SAML.
Frequently asked questions
Does formatter fix invalid XML?
It shows parse errors — you must close tags and escape & < manually.
Attributes order?
Pretty-print may reorder attributes visually but values unchanged.
Large XML files?
Browser may choke on multi-100MB — use xmllint CLI for huge files.
Namespaces?
Valid namespaces preserved — prefix bindings must be correct in source.
Compare two XML files?
Format both then use text diff tool.