Format XML.
Spot the nesting.
Pretty-print and validate XML documents locally so attributes, children, and closing tags are easier to inspect.
How do I format XML? Paste XML to get clean indentation — processed locally in your browser.
XML formatter
The browser parser validates well-formed XML. It does not validate an external XSD, DTD, or business schema.
How to format XML
- Paste your XML — or drop a file.
- Format and validate — mismatched tags get flagged with the position.
- Copy the clean version — consistent indentation for diffing and review.
When XML still shows up
- RSS feeds, sitemaps, and SOAP integrations
- Export files from enterprise and finance systems
- Before writing XPath or XSLT against a document
Good to know
Formatting only changes whitespace between tags — but in rare mixed-content documents that can alter meaning, so keep the original file if a parser cares about exact bytes. Related: XML to JSON when you want to work with the data as JSON.
What does XML formatting change?
It adds indentation and line breaks around nested elements while keeping element names, attributes, and text values readable.
Why did the parser reject my XML?
Look for an unclosed tag, mismatched tag name, unescaped ampersand, or an attribute without quotes.