XML Formatter & Validator

Format, validate, and minify XML online. Clean up XML documents and inspect syntax errors directly in your browser.

Free developer toolRuns in your browser

XML workspace

Format, validate, or compress your XML

298 characters
Ready to process
No output yet

XML quick reference

A few rules to remember when working with XML

Root element

An XML document must contain exactly one root element.

Closing tags

Elements must be properly closed and nested.

Case-sensitive

<Name> and <name> are different elements.

Quoted attributes

Attribute values must be quoted, for example id="123".

Special characters

Escape reserved characters such as &, <, and > in text.

Nested elements

Child elements must close in the correct order.

Privacy note: XML processing happens locally in your browser. Validation checks whether the XML is well-formed; it does not check compliance with an external schema.

Free XML Formatter & Validator · Runs locally in your browser