Paste your XML to format it with consistent indentation. Also flags unclosed tags, mismatched tags, and multiple root elements.
Google AdSense Banner
This area will contain advertisements after approval.
Google AdSense Banner
This area will contain advertisements after approval.
This tool parses your XML into tags, text, comments and CDATA sections using its own hand-written tokenizer, then re-indents it two spaces per nesting level. A single text-only child (like <name>John</name>) is kept on one line, matching how most XML formatters handle simple leaf elements.
Since formatting requires understanding the tag structure, this tool also surfaces common well-formedness problems as it goes: unclosed tags, mismatched opening/closing tag pairs, and multiple root elements (valid XML must have exactly one root element).
Formatting <root><item>value</item></root> produces three lines: <root> on its own line, <item>value</item> indented two spaces on the next line (kept on one line since it's a simple text-only element), and </root> back at the left margin. If the input were instead <root><item>value</root> (missing the </item> closing tag), the tool would throw an error, 'Mismatched closing tag: expected </item> but found </root>', instead of returning formatted output.
Assuming this checks validity against a schema (XSD/DTD), it only checks well-formedness (correct tag nesting and structure), not whether your specific elements and attributes match a schema's rules.
Including multiple top-level elements without a single wrapping root, XML requires exactly one root element, siblings at the top level (like <a/><b/>) will be flagged as an error even though each tag individually is well-formed.
Forgetting that XML tags are case-sensitive, <Item> and <item> are different tag names, a closing tag must match the opening tag's case exactly or it will be reported as mismatched.
The tool shows an error message describing the specific problem, such as a mismatched closing tag or an unclosed tag, rather than a formatted result.
No, this checks well-formedness only (correct tag structure), not validity against a specific schema. Schema validation is a separate, more involved process.
Google AdSense Banner
This area will contain advertisements after approval.