XML formatter

Paste XML to check its tags and get an indented version.

XML formatter

Documents up to 1 MB are supported.

Result

Formatted XML
<catalog>
  <book id="1">
    <title>XML</title>
  </book>
</catalog>
Elements
3

How it is calculated

  1. Opening and closing tags are checked, along with the single root element.
  2. Nested elements are indented by two spaces.
  3. Mixed content is kept without rearranging its text.

Example

<catalog><book id="1"><title>XML</title></book></catalog>

Good to know

  • The check covers tag structure; it does not validate a DTD or XSD schema.
  • Documents larger than 1 MB are not accepted.

Frequently asked questions

What is this tool used for?

Paste XML to check its tags and get an indented version.

How is the result calculated?

Opening and closing tags are checked, along with the single root element.

What should I check before using the result?

The check covers tag structure; it does not validate a DTD or XSD schema.

Updated October 11, 2026

Indicative result. For an important decision, check with a professional.