developer-tools
XML Formatter
Format, minify, and check well-formed XML online for configs, API responses, RSS, SOAP, and document snippets.
Tool workspace
The interactive tool requires JavaScript.
Instructions
2. Click "Format XML" to inspect indentation, or "Minify XML" to remove whitespace between tags.
3. Review errors, namespaces, attributes, and the target system rules before copying the result.
Paste XML to indent it or remove whitespace between tags. Processing stays in your browser. The tool checks tag structure, attributes, and the root element, but it does not validate DTD, XSD, or business rules.
XML Formatter checks whether the input is well-formed before producing a two-space indented result. XML minifying removes layout whitespace between tags. It does not validate DTD, XML Schema, namespace semantics, or API-specific rules, so important XML should still be reviewed against the target system.
What the XML Formatter checks
The tool checks for one root element, matching start and end tags, quoted attributes, closed comments and CDATA sections, and only allowed whitespace or declarations outside the root element.
What it does not validate
This tool does not load external DTDs, expand entities, read XSD files, or decide whether fields match SOAP, RSS, SAML, configuration, or API business rules. It focuses on well-formed structure.
When to be careful
Whitespace can be meaningful in XML, especially in mixed text, templates, signatures, or documents that preserve spacing. After formatting or minifying, review the result in the target system if whitespace matters.