Developer Tools

XML formatter and validator

Validate XML syntax and apply indentation locally. Reject DTD and external entities; preserve mixed content without inserting internal whitespace.

100,000 characters and 64 levels. Numbers that would lose precision are rejected.

Syntax validation, without XSD. DTD is forbidden. Indentation changes whitespace between elements: do not use for signed or whitespace-sensitive XML. Mixed content and xml:space retain internal spacing.

What this tool does

Check whether XML is well formed. This check does not prove conformity to an XSD schema or application rules.

How to use it

  1. Paste XML without a DTD and choose two- or four-space indentation.
  2. Process and review syntax errors.
  3. Copy or download XML and review meaningful whitespace before use.

Verifiable example

Input
<root><item>Hello</item></root>
Expected result
Indented elements with item text retained.

Limitations to review

  • 100,000 characters, 64 levels and 20,000 nodes. DTD/DOCTYPE and external entities are forbidden.
  • XMLSerializer may normalize quotes or namespace declarations. No XSD validation or byte-for-byte preservation.

Read the full tutorial

Related tools

Browse all guides. Local processing: the page downloads HTTP resources but does not send files or input data to a server for these functions.