Developer tool

Format and Validate XML

Check XML well-formedness and indent element markup for easier reading.

Runs locally in your browser

Your text is not uploaded.

Simple steps

How it works

  1. 01

    Paste XML into the editor.

  2. 02

    Choose indentation and format the document.

  3. 03

    Copy valid formatted XML or review the parser error.

Good to know

Frequently asked questions

Does formatting validate XML?

Yes. A browser XML parser checks that the document is well-formed before formatting.

Does it validate against an XSD or DTD?

No. It checks syntax only; schema validation is not included.

Can I choose indentation?

Yes. Select two spaces, four spaces, or tabs.

Will formatting preserve every whitespace node?

Formatting normalizes indentation between markup; review mixed-content XML carefully.

Is XML uploaded?

No. Parsing and formatting happen in your browser.