XML Formatter

Free. No sign-up. Your input is processed in your browser.

Check that XML is well formed and indent it without rewriting mixed text.

How to format XML

  1. Paste your XML or open a file.
  2. The indented result appears automatically. Press Tree to browse it.
  3. If the XML is not well formed, the parser message appears in place of the result.

Whitespace is handled with care

In mixed content, spaces can be part of the text. Elements that contain text, and elements marked xml:space="preserve", are copied as they are.

<p>Hi <b>there</b> you</p>

Well formed is not the same as valid

This tool checks XML syntax. It does not validate a document against an XSD or DTD.

Questions

Does it validate against XSD?

No. XSD validation is not included yet.

Are comments kept?

Yes. Comments and CDATA sections are kept.

Related tools

See all tools