Developer tool

XML Formatter & Validator

Paste XML, then format it with proper indentation or check whether it's well-formed.

"Well-formed" vs "valid"

This tool checks that your XML is well-formed — every tag properly opened and closed, correctly nested — which is what a browser's XML parser requires. It doesn't check against a schema (DTD or XSD), so well-formed XML can still fail a stricter validation elsewhere.

About the XML Formatter & Validator

XML Formatter pretty-prints XML with indentation and checks that it is well-formed. Use it to read messy XML from APIs, feeds and configuration files.

Well-formed XML follows the syntax rules: one root element, properly nested and closed tags, quoted attributes and escaped special characters. "Valid" XML additionally matches a schema or DTD, which this tool does not check. The browser's XML parser reports errors, which helps you find the problem.

How to use it

  1. Paste your XML.
  2. Press Format or Validate only.
  3. Read the output or error.
  4. Press Copy output.

Tips and good to know

Frequently asked questions

Does it validate against a schema?

No.

Does formatting change data?

It adds whitespace between elements.

Is it private?

Yes.