XML Formatter & Validator

Check that XML is well-formed and pretty-print it with 2 spaces, 4 spaces or tabs.

How to use XML Formatter & Validator

  1. Paste XML.
  2. Pick an indent style.
  3. Read the validation result and copy the formatted XML.

Supported features and limitations

Validation covers well-formedness only (matching tags, quoting, escaping). It does not validate against an XSD or DTD.

Privacy

Everything you type is processed locally in your browser and is not sent to our servers. No account is needed and there is no watermark.

Frequently asked questions

Does it validate against a schema?

No, only well-formedness.

Is whitespace preserved?

Whitespace-only text between tags is removed when formatting.

Related tools

More Text & Document Tools · All free tools