Developer tool

XML formatter

Indent XML so it can be read, and find out exactly where it breaks.

XML formatter Runs on your device
  • Runs in your browser — your text is never sent anywhere
  • No sign-up, no quotas, free to use as often as you like

How it works

XML turns up in the least convenient places: a SOAP response, a sitemap, a configuration file, an export from an ancient system that nobody maintains. It usually arrives on one line, and the first thing anyone needs is to see its shape — followed shortly by finding the one unclosed tag that is breaking everything.

Formatting and minifying

Indenting reveals the structure. Minifying strips the whitespace between elements, which is what you want before sending a payload or storing one. Both preserve the content itself; only the whitespace between elements changes.

It checks the document is well-formed

The XML is parsed by your browser's own parser before anything is printed. If it is not well-formed — an unclosed tag, a stray ampersand, mismatched nesting — you get the parser's own message about what went wrong instead of quietly mangled output.

Well-formed is not the same as valid

This checks the syntax, not whether the document matches a schema or DTD. A document can be perfectly well-formed and still be wrong for its purpose; that needs schema validation, which this does not do.

Why it runs locally

XML payloads routinely carry credentials, customer records and internal endpoint names. Pasting one into a server you do not control is a genuine disclosure. Here the parsing happens in the page.

FAQ

XML formatter — questions

Does it check my XML against a schema?

No. It checks that the document is well-formed. Schema or DTD validation is a different job.

Will formatting change my data?

No. Only the whitespace between elements changes.

What happens if my XML is broken?

You get the parser's own error message describing what is wrong, rather than mangled output.

Is my XML uploaded?

No. It is parsed and formatted in your browser.