Back to Free Tools

FREE TOOLS

XML Formatter

Format XML while retaining mixed text, attributes, namespaces, comments, and instructions.

XML

XML

Browser only

Your input and output are processed in this browser. They are not uploaded for processing. No account is required.

This tool needs JavaScript. If it does not load, refresh the page and try again.

How to use this tool

  1. Paste XML text or choose a UTF-8 file; a chosen file takes precedence.
  2. Indentation is added only to element-only content. Existing whitespace stays by default; explicit removal changes whitespace-only text and respects xml:space.
  3. Select Process data, review the result, and download it. Use Reset to clear the working data.

Examples

<people><person><name>Alice</name><score>10</score></person><person><name>Bob</name><score>20</score></person></people>

Limitations

XML 1.0, UTF-8, at most 40 nesting levels and 200,000 nodes. No DOCTYPE/custom entities/external resolution. Parser normalizes line endings, entity spelling, and attribute whitespace. 5 MiB input, 20 MiB output.

Related tools

No items found.

More tools for your workflow

Explore the related desktop tool