D
Devault

XML Formatter

Format and minify XML — 100% local processing

Input
Output
⌘↵ to format

About XML Formatter

XML is still widely used in configuration files, SOAP services, feeds, and enterprise systems. Machine-generated XML is often a single long line, which makes it almost impossible to read or diff.

This tool formats XML with consistent indentation, or minifies it to remove unnecessary whitespace, in your browser. Formatting only changes whitespace between elements; element content and attributes stay the same. Whitespace inside text nodes can matter in some XML dialects, so verify the result where that applies.

Common use cases

  • Making a SOAP response or feed readable.
  • Reviewing an XML configuration before deploying it.
  • Minifying XML to reduce payload size.
  • Checking that a document is well formed.

Frequently asked questions

What does well-formed mean?
Every tag is closed and properly nested, attributes are quoted, and there is a single root element.
Does formatting change the document's meaning?
Normally no, but where whitespace inside text is significant, extra indentation can alter the content.
Does it validate against a schema?
No. It formats and checks that the document is well formed, but does not validate against an XSD or DTD.