Developer

XML Formatter

Paste XML to indent it properly, check that it parses, or compress it back down to a single line.

Developer

XML formatter

Local only
Everything stays in your browser

Your text is processed on your device — nothing is uploaded to a server.

Reading formatted XML

Indentation shows the nesting depth of every element, which makes it far easier to spot a tag that was never closed or an attribute on the wrong node.

Validation

The browser's own XML parser checks the document. If it reports an error, the first line of that error is shown so you can find the offending tag.

Good to know

Frequently asked questions

Does this validate against a schema?

No. It checks that the XML is well-formed. XSD or DTD validation is not performed.

Is my XML uploaded?

No. Parsing and formatting happen entirely in your browser.

Can it handle large files?

Yes, though very large documents (tens of megabytes) may take a moment to render.

Why did formatting fail?

Usually an unclosed tag, a stray < or > character, or mismatched element names.