XML Formatter & Validator

Format, validate, and minify XML online. Inspect well-formedness errors directly in your browser.

Free developer toolRuns in your browser

XML workspace

Format, validate, or minify 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.

Important: The browser parser checks well-formedness, not conformance to an XSD or DTD. Minifying mixed-content XML can change its meaning if whitespace is altered. Test with representative XML documents before deploying. Processing occurs locally in your browser; this tool does not send XML to a server.

Free XML Formatter & Validator · Runs locally in your browser