XML Formatter, Beautifier & Validator
Paste XML to validate and pretty-print it with readable indentation, or minify it for transport. Attributes, comments, namespaces, and document order stay intact.
Tool input stays in your browserDid you know · JSON
YAML 1.2 is a superset of JSON, so any valid JSON document is also valid YAML.
XML input
you edit—Formatted XML
read only—Format XML without uploading it
XML still carries SOAP messages, SAML assertions, RSS feeds, SVG files, and build configuration. Those documents often contain account identifiers or internal URLs. This formatter parses and rebuilds the document in this tab; the XML is not posted to a formatting API.
Validation with useful locations
A missing closing tag or malformed attribute stops formatting and reports its line and column. Valid documents can use two- or four-space indentation. Minify removes formatting whitespace while preserving meaningful nodes.
What is preserved
The parser runs in preserve-order mode, retaining repeated elements, attributes, comments, processing instructions, and namespace prefixes. Formatting changes presentation, not the element hierarchy.