Format XML with proper indentation, or check whether it's well-formed, entirely in your browser.
Input:
Formatted:
This tool checks whether your XML is well-formed -- correct basic syntax, like properly closed and nested tags. It does not check your document against an XSD or DTD schema (which would additionally verify things like "this element is only allowed to appear twice" or "this attribute must be a number"). A result of "Valid XML" here means well-formed, not schema-validated.
Well-formed means the XML follows the basic syntax rules -- every tag is properly closed, tags are properly nested, there's exactly one root element, and so on. This is different from schema validation (checking against an XSD or DTD, which defines which elements/attributes are allowed and in what structure) -- this tool only checks well-formedness, and will never claim "Schema Valid."
Using your browser's own built-in XML parser (the same one used internally by browsers for XML documents), not a hand-written regex checker -- so unclosed tags, mismatched tags, and other structural problems are detected accurately and reported with a real parser error message.
Both are preserved exactly -- comments stay as <!--...--> and CDATA sections stay as <![CDATA[...]]>, in their original position in the document.
Yes -- every attribute and its value is kept on the formatted element exactly as written (values are re-escaped for safety, but never altered).
An element whose only content is a single piece of text is kept inline for readability, matching how most hand-formatted XML looks -- only elements that contain other elements (or multiple pieces of content) get broken across lines.
No. Every check and transformation runs locally in your browser. Nothing you paste here is sent to Brekzy or stored anywhere.
Explore Brekzy's growing collection of free calculators, converters, AI tools, and practical resources.